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>
This commit is contained in:
Peter Hutterer 2012-10-17 14:13:29 +10:00
parent 3018f9c1e5
commit 6764471901
1 changed files with 5 additions and 0 deletions

View File

@ -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)