summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-05-30 13:26:43 +0300
committerPovilas Kanapickas <povilas@radix.lt>2021-05-30 13:26:43 +0300
commit75feb1366809bfb6d50734c10ab11258783a2e9d (patch)
tree665609e34fc2acb0a8855c9892eb77921663b15a /Xi
parent5163fc8bc28ce8bc2703cddcd9f2775ebc311766 (diff)
Xi: Include gestures among events that may freeze device
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index f878dd212..9d4886212 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1766,6 +1766,7 @@ ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev)
GestureInfoPtr gi;
DeviceIntPtr kbd;
Bool deactivateGestureGrab = FALSE;
+ Bool delivered = FALSE;
if (!dev->gesture)
return;
@@ -1795,7 +1796,11 @@ ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev)
GrabIsGestureGrab(dev->deviceGrab.grab))
deactivateGestureGrab = TRUE;
- DeliverGestureEventToOwner(dev, gi, ev);
+ delivered = DeliverGestureEventToOwner(dev, gi, ev);
+
+ if (delivered && !deactivateGestureGrab &&
+ (IsGestureBeginEvent(ev) || IsGestureEndEvent(ev)))
+ FreezeThisEventIfNeededForSyncGrab(dev, ev);
if (IsGestureEndEvent(ev))
GestureEndGesture(gi);