summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-21 14:45:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-21 15:20:38 +1000
commit2bb282cd45cb8149b39d72397ef5bbcfebca11d2 (patch)
treeeea080f5729afd28f129c1e8d68f65269c5e1106
parent475ef5cc8339fac3696fe654ef683f92f0b0cc2c (diff)
Xi: only activate the device grab if we don't already have one
If the device is already grabbed, don't activate the passive grab, it screws with our event masks. Just deliver to the grabbing client instead. Reported-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--Xi/exevents.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 084969097..db49e31b8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1385,8 +1385,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent
if (grab)
{
/* this side-steps the usual activation mechansims, but... */
- if (ev->any.type == ET_TouchBegin)
- ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */
+ if (ev->any.type == ET_TouchBegin && !dev->deviceGrab.grab)
+ ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */
else {
int deliveries = 0;
/* 'grab' is the passive grab, but if the grab isn't active,