diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-10-17 14:13:29 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-10-29 13:15:50 +1000 |
commit | 676447190190d8546165e21be242cf16dd69f5ae (patch) | |
tree | a9eea3ba857586317bc7ce8ed91cf38f1babadc7 | |
parent | 3018f9c1e5109680dcf69b8f2d7807696a473bde (diff) |
Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738)
If a client is still waiting for the TouchBegin, don't deliver a TouchEnd
event.
X.Org Bug 55738 <http://bugs.freedesktop.org/show_bug.cgi?id=55738>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Thomas Jaeger <thjaeger@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | Xi/exevents.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 6ed499142..4cbeb3796 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1862,6 +1862,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, goto out; } + if (listener->state == LISTENER_AWAITING_BEGIN) { + listener->state = LISTENER_HAS_END; + goto out; + } + /* Event in response to reject */ if (ev->device_event.flags & TOUCH_REJECT) { if (listener->state != LISTENER_HAS_END) |