[BUG] Mac Squeak gets all mouse events even when not active

John M McIntosh johnmci at smalltalkconsulting.com
Fri Apr 6 01:54:51 UTC 2001


At 6:10 PM -0700 4/5/01, Scott Wallace wrote:
I used to have this trouble (for more than a year)...

>   John, have you any insights, or plan of attack, to offer on this?

Ok (to you all, plus the squeak list), I've actually been working in 
this area today because of issues with Carbon and to clean up some 
code for the Netscape plugin, and because it was old fragile code 
written as far back as Squeak history allowed and has evolved both 
for mac os changes and for event handling support.

What I've have found is that sometimes we don't get a window 
deactivate event so the mouse events are picked up as null event and 
processing when Squeak is in the background. I've fixed that by 
adding the code that decides if the cursor is  alive or suspended to 
the resume/suspend logic in the event handler. We always get a 
resume/suspend which btw is handled differently by carbon just to 
make things interesting.

Now the other interesting area which I'm currently exploring is what 
happens when a modeless floating dialog window is over the Squeak 
window, say the Finder's process window, I think Bob pointed this 
out. In this case if you click, then Squeak gets the clicks.

Why? Before today I couldn't figure it out, however after rewriting 
the null event handler it is clear what is happening. The Squeak 
window is active, but if you click on the dialog window a null event 
is given to Squeak to allow Squeak to run of course. BUT we then 
examine the state of the button and keyboard and happily generate a 
mouse event since of course that information is global, and the mouse 
button *is* down.

Right now I'm trying to figure out how to ignore it...
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





More information about the Squeak-dev mailing list