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 23:08:48 +0200
On May 08, 2012, at 20:44, Jeremy Huddleston wrote:
> Well, you inherited broken code. That's not how events are to be handled. You need to get the data from the event itself, not waste a round trip to the server to get a more recent/conflicting state. Events are sent in-order. Your application should not need to know about the mouse state "in the future" ... you'll get that event when you're told about it. Doing things like this leads to bugs like this.
OK, so I'm doing a few calls too many. That shouldn't be a bug, it should be like calculating something twice. Inefficient, but without side-effects.
But can we forget about that for a while? The manual page for XQueryPointer clearly states that it returns the current state - while it clearly doesn't always do that.
>
>> 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.
>
> That is because you probably have 3-button emulation enabled. That coupled with the buggy event handling code would explain your inconsistencies.
No, I don't have the emulation enabled.
>
>> 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.)
>
> Yes, this is consistent with my hunch above.
The moot one about the 3-button emulation? Even if I did have it enabled, it shouldn't have any effect on my Linux X11 server ... and remember that I didn't signal any issues with the mouse button information (because there isn't any).
I do agree that this is probably not Mac specific at (/after) all ... but I'm not really in the mood to sign up for yet another mailing list.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden