summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-10-17 14:13:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-11-07 09:59:00 +1000
commita3f11d2f6066d2120e84f0c33684943474aa8ae1 (patch)
tree3c1b4362c26a0f95bcbba94f1aed13beb8026cc7 /Xi
parent11319a922575f1da1d3c5774728c0dee12bab069 (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> (cherry picked from commit 676447190190d8546165e21be242cf16dd69f5ae)
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c5
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)