[PATCH] Don't release passive grabs unless all buttons are up
Thomas Jaeger
thjaeger at gmail.com
Sun Dec 21 16:21:09 PST 2008
I've been looking at the other places where buttonsDown is used. In
CheckDeviceGrabs, I think we also want logical state, not physical
state. I'm not sure what's up with motionMask, but since it's related
to event handling and events should also see logical state, I think it
would make more sense for buttonsDown to count the number of buttons
that are down and aren't mapped to 0. I hope I'm not way off.
Thanks,
Tom
Thomas Jaeger wrote:
> This turned out to be a little bit trickier than I initially thought,
> since buttonsDown counts the number of physical buttons that are down,
> before they are mapped to logical buttons.
>
> The thing I'm unsure about (as should be evident from the patch), is
> where to stick the declaration for the new function AllButtonsAreUp.
>
> Thanks,
> Tom
>
> Thomas Jaeger wrote:
>> I can't see any reason why we would treat buttons > 5 differently. This
>> patch simplifies client code by eliminating the need to call XGrabDevice
>> after a button has been pressed and prevents race conditions that could
>> result from that.
>>
>> Tom
>
>
More information about the xorg
mailing list