Win VM modifications
Rob Gayvert
rtg at rochester.rr.com
Thu Mar 3 12:58:01 UTC 2005
Andreas Raab wrote:
>>> while(PeekMessage(&msg,stWindow,0,0,PM_NOREMOVE))
>>> GetMessage(&msg,stWindow,0,0);
>>
>> It's been ages since I chatted in C with the Win32 API, but this
>> wouldn't harm regular Squeak at all, would it?
>
> We just tried it, and no, it wouldn't harm regular Squeak at all. But
> it does seem to harm Areithfa Ffenestri support (see
> http://minnow.cc.gatech.edu/squeak/3862) quite severely.
That certainly makes sense -- everything but your main window will be
ignored.
> Just out of curiosity: Why does wxSqueak have problems with the code
> that's in the VM right now? It is the common application mainloop so
> unless wxSqueak implements its own mainloop there should be no reason
> to modify the above. And I couldn't possibly imagine that you got the
> VM to work with anything but the mainloop in interp.c ;-)
Well, this was the fundamental problem in getting two GUI systems to
work together, when each one wants to have the MainLoop. I'm not crazy
about the current scheme, but here's how it works. As we've discussed,
the Squeak loop is modified to ignore events to non-Squeak windows. At
startup, a process is run that checks every few milliseconds for an
event to a wx-window (ignoring events to the Squeak window). When it
gets an event, it passes it through the normal wxWidgets processing. Not
pretty, but it works.
Initially, I had hoped that I could tap into events after they arrived
on the Smalltalk side, assuming they had been augmented with window
information like your're doing with Areithfa Ffenestri. But Squeak
events are handled asychronously, and so much of the wxWidgets event
processing depends on them being handled synchronously that I just
couldn't get it to work.
More information about the Wxsqueak
mailing list