[PATCH 2/3] Update event type when delivering end event to a pointer listener

Chase Douglas chase.douglas at canonical.com
Tue Apr 10 17:12:41 PDT 2012


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 <chase.douglas at canonical.com>
---
 Xi/exevents.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 3117123..a843e03 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;
     }
 
-- 
1.7.9.1



More information about the xorg-devel mailing list