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 <carl...@gnome.org>
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 Xi/exevents.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 0849690..db49e31 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,
-- 
1.7.7.4
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to