Morphic graphics, Displaying fonts & canvases
John M McIntosh
johnmci at smalltalkconsulting.com
Fri Apr 20 18:53:03 UTC 2007
On Apr 20, 2007, at 11:18 AM, J J wrote:
> Related to Ffenestri, doesn't the Squeak VM try to open the normal
> window first and then get told not to or something like that? How
> hard would it be to have the display part of the code be a class
> that is configurable at start time so that the image could start in
> Ffenestri, some other display or even headless without doing the
> extra work?
Well that depends on the VM, currently when the VM runs non-headless
at some point it cheerfully opens a window. When this happens is a VM
issue.
The macintosh VM would not open the window until the first draw to
the Display occurs. This decision was done about 10 years back
because the original written code would open the window, but Squeak
would take many seconds on 25Mhz 68030 machines to get around to
drawing leaving you with a white window.
The side effect of this is when people make changes to morphic and
seriously break it one can open an image on the mac and not get a
window because
the drawing code is never executed. However this then blocks the
cmd-'.' because the keyboard handlers are not installed since that
requires a window.
On *other* platforms I believe the window would open, and cmd-'.'
would work.
3.8.17b1 which I have not released yet has a info.plist setting that
decides if the image must explicitly open the main window, versus
auto-opening. It
also allows you to close the main window, and later reopen the main
window, or have the image decide exactly when the window should be
opened.
For the mac carbon VM there is other complexity because when using as
the base for the browser plugin ,it runs without a window, but when you
switch to full screen, it must then come to the foreground, and
install a window and install the keyboard/mouse handlers. Later when
you switch out of full screen it hides the window and switchs the
browser to the foreground which then accepts the keyboard/mouse
events and passes them to the VM for interpretation.
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|