[PATCH] Don't release Xi grabs unless all buttons are up
Thomas Jaeger
ThJaeger at gmail.com
Sun Jan 4 23:32:13 PST 2009
Don't change core grab behavior since buttons > 5 don't exist as far as
the core spec is concerned.
---
Xi/exevents.c | 3 ++-
dix/events.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index b4359a8..412c15b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1069,7 +1069,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
xE->u.u.detail = key;
return;
}
- if (!b->state && device->deviceGrab.fromPassiveGrab)
+ if (device->deviceGrab.fromPassiveGrab &&
+ (grab->coreGrab ? !b->state : !ButtonsDown(b)))
deactivateDeviceGrab = TRUE;
}
diff --git a/dix/events.c b/dix/events.c
index 5ebbe12..90ece66 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3846,7 +3846,8 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
if (xE->u.u.detail == 0)
return;
filters[mouse->id][Motion_Filter(butc)] = MotionNotify;
- if (!butc->state && mouse->deviceGrab.fromPassiveGrab)
+ if (mouse->deviceGrab.fromPassiveGrab &&
+ (grab->coreGrab ? !butc->state : !ButtonsDown(butc)))
deactivateGrab = TRUE;
break;
default:
--
1.6.0.4
--------------060501070101080704070504--
More information about the xorg
mailing list