Re: mask_return mystery in XQueryPointer()
Re: mask_return mystery in XQueryPointer()
- Subject: Re: mask_return mystery in XQueryPointer()
- From: "René J.V. Bertin" <email@hidden>
- Date: Tue, 08 May 2012 20:04:34 +0200
>> In other words, the information contained in the event state variable and in the mask_return argument to XQueryPointer is not consistent among event types.
>
> You should have this discussion on xorg-devel since this is not an issue specific to XQuartz.
Can we be sure? Indeed this is not specific to XQuartz because I'm observing the same thing in the X.org server running on my linux VM ... but both run on an OS X 10.6 machine. I cannot test this elsewhere, and I have this hunch the xorg people won't know as much of the OS X intrinsics as someone on here ;)
>
> XQueryPointer is not something that you should be doing in your event handling. It does not introspect the event you were given. It sends a request to the server to determine what the current state of the pointer is, and it is expected that this will often be inconsistent with what you see in the event because you may have unprocessed events in your event stream.
This is old code I inherited. It handles mouse actions (zooming, selecting etc) in a close loop inside of which it does an XGrabPointer and XGrabKeyboard (which appear to be required to the code to work). The XQueryPointer calls are done exactly for the reason to know the pointer's current state, which might well be not be the one contained in the last received event. However, I don't expect the phenomenon I described when I press and hold Shift-Mod1, then click Button1 all while holding Shift-Mod1 until I release Button1.
Also, what I described occurs only when I hold Mod1, possibly with the Shift key held too. Mod2 with modifiers works as expected, and Mod1 with Control works as expected too. (And this code also worked perfectly under OS X 10.4.11 with its own X11 server.)
René
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden