Re: Syx WM?

0 views
Skip to first unread message

rahul

unread,
Dec 15, 2007, 4:04:46 PM12/15/07
to syx-d...@googlegroups.com
Sorry for responding late.

> we have talked about that in chat alread, Luca but I like to evolve
> that idea a bit more. from my perspective i have found that I am
> dissatisfied with current window managers under Linux. So the question
> is: What is missing? What current window managers are missing are a
> great deal of flexibility and also if you look at them and compare
> them they can be categorized in few categories. To say it simple:
> Boring, boring, boring. ;-)

: )

> * First step should be to write an application in syx that is accepted
> as a window manager by X11. I guess that this is not a unresolveable
> task because there are tons of small window managers out there. The
> first version should maybe just draw a window to test smalltalk
> commands

The attached tar.gz is a very dirty translation of tinywm code, and works
as a very minimal windowmanager.

To use it:
Install the plugin in the correct path. (x11.sh does it)
use 'xinit' undex linux or other unixes so that you have just an Xterm
window running on the Xserver.
Startup Syx
$syx
>Smalltalk loadPlugin: 'x11'!
>FileStream fileIn: 'x11.st'
>Wm invoke!

This should now function as a _very_ minimal window manager and allow you
to move and resize your Xterm window (or any other window that you have open)
-- use alt + mouse button 1 drag to move
and alt + mouse button 2 drag to resize.

The code is ugly and I have not used params as I could not find how to pass
to objects to smalltalk variables etc. They will have to be fixed as
the first step
if it is used even as an example. (Luca could you give me some examples as to
how to return the object pointers to ST and pass them back in as parameters?.)

wm.tar.gz

Luca Bruno

unread,
Dec 16, 2007, 11:32:53 AM12/16/07
to syx-d...@googlegroups.com
Very cool, i'm glad of this example really.
Thanks.

> The code is ugly and I have not used params as I could not find how to pass
> to objects to smalltalk variables etc. They will have to be fixed as
> the first step
> if it is used even as an example. (Luca could you give me some examples as to
> how to return the object pointers to ST and pass them back in as parameters?.)

Ok i'll say you the mistakes:
1) #(dpy event) is an array of symbols, so you passed to the primitive
#dpy and #event. Instead do (Array with: dpy with: event) or simply
{dpy. event} next time.
2) You can return a pointer from primitives just like a SyxOop, but take
care when you use it, its class is a CPointer. You can use it just like
a Smalltalk object but it's NOT a Smalltalk object. Just pass it but
avoid sending messages to it.

I attached a new version, hopefully you would appreciate this.
Well, i like using primitives methods instead of using
Smalltalk>>#plugin:cCall:withArguments:, just a matter of style.
I wrote that just to show you how to use the alternative.

To install and start the wm please read the README file.

Once the server started, moving or resizing the window will cause an X
error. I've no knowledge of X, anyway let me stay tuned.

Bye and thanks again.

--
http://lethalman.blogspot.com - Toughts about computer technologies
http://syx.googlecode.com - Smalltalk YX project
http://www.ammazzatecitutti.org - E adesso ammazzateci tutti

syxwm.tar.gz

rahul

unread,
Dec 17, 2007, 4:46:35 AM12/17/07
to Syx general discussion
> Ok i'll say you the mistakes:
> 1) #(dpy event) is an array of symbols, so you passed to the primitive
> #dpy and #event. Instead do (Array with: dpy with: event) or simply
> {dpy. event} next time.

thanks, I am very poor in ST :)

> 2) You can return a pointer from primitives just like a SyxOop, but take
> care when you use it, its class is a CPointer. You can use it just like
> a Smalltalk object but it's NOT a Smalltalk object. Just pass it but
> avoid sending messages to it.

> I attached a new version, hopefully you would appreciate this.
> Well, i like using primitives methods instead of using
> Smalltalk>>#plugin:cCall:withArguments:, just a matter of style.
> I wrote that just to show you how to use the alternative.

Thanks a lot. It clears most doubts I had, and your additions to the
SmallTalk portion is very useful as I can use them as guidelines :)

> To install and start the wm please read the README file.
>
> Once the server started, moving or resizing the window will cause an X
> error. I've no knowledge of X, anyway let me stay tuned.

I have uploaded the updated version in the here.
http://syx-discuss.googlegroups.com/web/syxwm.tar.gz

Do let me know if it works.
Reply all
Reply to author
Forward
0 new messages