[PATCH 10/12] Xi: Don't emit a TouchEnd event to a frozen device
Peter Hutterer
peter.hutterer at who-t.net
Mon Mar 4 22:21:19 PST 2013
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 at who-t.net>
---
Xi/exevents.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 76c456b..38b39c3 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;
--
1.8.1.4
More information about the xorg-devel
mailing list