If the cursor is moved between the MacWindow and MacTextWindow the
cursor switches to beam and back but when you click in the MacTextWindow
the cursor gets stuck to beam no matter which window or menu you are
hovering over
The LucasArts SCUMM games need to know when this happens so that they
can turn the screen black. Polling the window manager for the menu
status probably wasn't good enough, because it seemed there were cases
where the menu was both activated and opened too quickly for the game to
have a chance to register it happening.
There is no callback for when the menu is deactivated. I could be wrong,
but I don't think this is quite as sensitive?
Previously, every palette change in a game get passed on to the Mac
Window Manager, which would then have to look up new colors for drawing
Mac GUI stuff. This was fine for some games, but later ones do a lot of
palette animations, which could slow things down.
Now the Mac Window Manager gets the new palette only when it's about to
draw the Mac menu, or when it's about to draw a dialog (since those can
be triggered outside of the menu).
Additionally, the Mac Window Manager now triggers the auto-opening of
the menu in the event handler, not in the drawing code. Otherwise the
menu would be drawn once before the SCUMM Mac GUI could notice that the
menu was visible, causing an ugly color glitch.
As part of fixing a graphical glitch in Mac Indiana Jones and the Last
Crusade, eliminate the menu timer from the Mac window manager. It's just
too unpredictable and error prone for my taste.
When moving the mouse through the menu bar, over a part that's not
occupied by menu items, the Mac menu class will start calling
processEvent() recursively. This is bad for two reasons: During the
recursion (which can easily reach a depth of dozens or even hundreds of
calls) there is no delay, so it will use 100% CPU. And once the
recursion unwinds, all the delays will come at once.
This moves the call to eventLoop() to after the first event has been
fully processed. Hopefully that will have approximately the same desired
effect, without any of the bad side effects.
Active MacWindows should always be passed EVENT_KEYDOWN events by MacWindowManager.
Previously it would only do so if the mouse was in the vicinity.
Fixes text input on the savegame screen of Team Xtreme: Operation
Weather Disaster.
The menuTimerHandler() function is called from a timer, which means that
anything that it touches could potentially cause threading issues. I
suspect this is what's been causing the screen to go black for me a few
times, but it's not something I can reproduce at will. Add a mutex to
try and fix this.
This patch adds background window, these are special type of window where
the window is always in background and in a multi-window environment, it
will prevent the window from being brought to front.
Lockable widgets are those which takes in all input
and if set then no other widget can take any input
its same as them being inactive, no buttons, animations
etc will work.
This is implemented to support `modal` property of window,
which requires a window to take all input and prevent all
others from having any actions.