From 163b0f375d73c05873fb341652de3ed347337828 Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Tue, 10 Apr 2012 17:12:41 -0700 Subject: [PATCH] Update event type when delivering end event to a pointer listener Just like when we deliver to a touch listener, we must convert a touch end event to an update event for further clients. This also ensures that the touch record is not deleted at the end of ProcessTouchEvent(). Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- Xi/exevents.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 31171239f4..a843e0300b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1757,6 +1757,13 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, listener->type == LISTENER_POINTER_GRAB) { rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); + + if (ti->num_listeners > 1) { + ev->any.type = ET_TouchUpdate; + ev->device_event.flags |= TOUCH_PENDING_END; + ti->pending_finish = TRUE; + } + goto out; }