Squeak Window

Ian Piumarta Ian.Piumarta at inria.fr
Mon Dec 20 18:07:59 UTC 1999


For Unix...

> >*) Is there anyway to lock the extent of the window,
> >so that the user cannot drag or re-size any of the
> >borders?
> 
> I think this requires a vm tweak.

Trivial: in sqXWindow.h just after the call to XSetWMHints(), insert a
call to XSizeHints() with appropriate arguments to limit the maximum
size of the window.  (See the XSizeHints manual page for a list of
several size-related limits that can be set.)

> >*) Is there anyway to change the window type to a
> >modal, or a palette, or an un-bordered/titled window?
> 
> Er...probably. But this is a vm tweaky issue (my guess).

You need to call XSetTransientForHint() on the window to make it a
"dialogue" for the root window.  This is already implemented: just
start the VM with "-notitle".  (This is a disgustingly backhanded way
to force the title to go away -- something that is [and should always
be] entirely the responsibility of your window manager.  Some WMs can
already be configured to remove the title [and limit the resizing of
windows too] based on the windows' class or instance name.  In Unix,
the window class name is "Squeak" and the instance name tracks the
name of the image that you're running.)

Removing the border is also trivial: change the border_width parameter
in the call to XCreateWindow().  (Again, this is very bad programming:
you should be able to tell your window manager to do this for you,
without changing the support code.  This may also be futile: any
half-decent WM should override this value, with whatever value you've
configured for Squeak windows.)

For other OSs: I have absolutely no idea.

Ian





More information about the Squeak-dev mailing list