Window restore problem

Tim Rowledge rowledge at interval.com
Thu Dec 10 20:08:42 UTC 1998


On Wed 09 Dec, Richard L. Peskin wrote:
> In the BeOS PPC port of Squeak, when the "containing" window (Be
> application window) is resized (made larger), the Smalltalk has to be
> issued a "restore display" message before it will fill the newly sized
> window. (I have heard this is/was also a problem with the Win32 port.)
This is a pretty universal problem, that is representative of a whole class of
problem we ought to think of solving.

At the moment, only very specific events are dealt with; the list has grown
gradually and in a rather piecemeal fashion as Squeak has developed.
Keypresses, mouse presses, timers, sockets being ready, sound buffers filling,
and most recently finalization needing attention. If other events are of
interest, tough luck for now.

The Display changing is just one more quite important event - what about 'a
file has been dragged and dropped over the squeak window'? or 'the OS wants to
quit -is that ok?' type events.

I was going to suggest that it is easy to handle, but that answer assumed that
we are using the old InputState class which read generic events from the input
queue and processed them in the image. We don't do that in Squeak...

So, I'd like to suggest a fairly simple mechanism that provides for reasonably
flexible options to do these things. The VM would need one more primitive to
set the semaphore to signal when an 'unspecified OS event' occurs, just like it
has now for sockets etc. The semaphore would be registered in the external
objects array as normal. Platform specific code (in sqXXXWindows.c for example)
would signal the semaphore as usual whenever some event occured, and then image
code would query the VM via another prim for the event info.  Of course, this
is pretty much how the InputState stuff used to work - so we know it should
function ok!

I can produce the code for this in pretty short order if people want it; is
there enough interest and enough OS events to make it worth it?

tim

-- 
"How many Teela Browns does it take to change a lightbulb?"
"Stupid question."
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list