Strange screen behavior
Ian Piumarta
Ian.Piumarta at inria.fr
Wed Nov 24 17:52:16 UTC 1999
> The actual behavior (both Mac and Linux) is as follows. The first
> time a new Workspace window is opened or expanded following initial
> launch of Squeak, middle and right button contextual menus open at
> 0 at 0. This behavior persists until a retore display is done. I do NOT
> see this behavior with Morphic windows, transcripts or browsers.
> Perhaps it is a Workspace implementation issue.
No, it's like the original message said. I fixed this last week (it's
been driving me nuts for the past 3 years). The code is at home, so I
can't post it right now -- but you can do it for yourself easily enough.
In HandleEvents(), add a case to the main switch() to handle MapNotify
(just before the UnmapNotify loop for "lazy" mode is probably the most
tasteful location):
case MapNotify:
{
Window root, child;
int rootX, rootY, winX, winY;
unsigned int mask;
if (True == XQueryPointer(stDisplay, stWindow,
&root, &child,
&rootX, &rootY, &winX, &winY, &mask))
{
mousePosition.x= winX;
mousePosition.y= winY;
// could also update the modifiers here based on mask, but
// I can't be bothered...
}
}
break;
Type "make" in the usual place, and forget about that reflex that used
to nag at you to always move the mouse before trying to open a menu...
Excuse any typos that might have crept into the above -- it should be
easy to spot what I should have typed.
Ian
More information about the Squeak-dev
mailing list
|