Re: [PATCH] Don't release passive grabs unless all buttons are up

2009-01-05 Thread Keith Packard
On Mon, 2009-01-05 at 16:07 +1000, Peter Hutterer wrote: Following up on that: Both the core protocol and the XI protocol spec state that a passive grab is to be released when all buttons are logically up, regardless of modifiers. This is where the magic number 5 comes in. Core allows for 5

Re: [PATCH] Don't release passive grabs unless all buttons are up

2008-12-22 Thread Peter Hutterer
On Sun, Dec 21, 2008 at 10:14:53PM +0100, 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. Makes sense. I haven't tested the patch, but it

Re: [PATCH] Don't release passive grabs unless all buttons are up

2008-12-21 Thread Thomas Jaeger
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

Re: [PATCH] Don't release passive grabs unless all buttons are up

2008-12-21 Thread Thomas Jaeger
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

[PATCH] Don't release passive grabs unless all buttons are up

2008-12-20 Thread Thomas Jaeger
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 From cc4a046ac387bd03c1cba1d017bdc1ced75b44d0 Mon Sep 17