summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-03-01 10:41:01 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-10 14:32:36 +1000
commit0eb9390f6048049136347d5a5834d88bfc67cc09 (patch)
tree33557bfb9ec3e263906e6ee8eeb9805d07837bd9 /Xi
parenta7d989d335f903ffd8b168cd2beeb82c78d30c21 (diff)
Xi: Don't emit a TouchEnd event to a frozen device
EmitTouchEnd calls DeliverTouchEvents directly instead of through public.processInputProc. If a device is frozen, the TouchEnd is processed while the device is waiting for a XAllowEvents and thus ends the touch point (and the grab) before the client decided what to do with it. In the case of ReplayPointer, this loses the event. This is a hack, but making EmitTouchEnd use processInputProc breaks approximately everything, especially the touch point is cleaned up during ProcessTouchEvents. Working around that is a bigger hack than this. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index f4804735a..f500669ad 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1067,6 +1067,10 @@ EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
{
InternalEvent event;
+ /* We're not processing a touch end for a frozen device */
+ if (dev->deviceGrab.sync.frozen)
+ return;
+
flags |= TOUCH_CLIENT_ID;
if (ti->emulate_pointer)
flags |= TOUCH_POINTER_EMULATED;