[PATCH] Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738)

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 18 17:57:01 PDT 2012


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 at who-t.net>
---
 Xi/exevents.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 6ed4991..4cbeb37 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)
-- 
1.7.11.7



More information about the xorg-devel mailing list