diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-03-01 10:41:01 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-07-17 14:35:38 +1000 |
commit | 4dac09796ca7ec19c1a9b17f338babd51c999e2e (patch) | |
tree | ea3bea32265eada9e29498262026681273c26d41 | |
parent | c8a48358065ff94b8307d8aedfe58e54f34ba84f (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>
(cherry picked from commit 0eb9390f6048049136347d5a5834d88bfc67cc09)
-rw-r--r-- | Xi/exevents.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 7975a404b..10fb8105f 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; |