[PATCH 3/4] dix: don't attempt to deliver an event for a different grabtype

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 3 22:34:28 PDT 2013


For an active grab, grab->eventMask can be either the core or the XI1 mask.
With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a
ProximityOut event will trigger if the client has selected for enter events -
the filter is the same for both.

Thus, we end up delivering a proximity event to a client not expecting one.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dix/events.c b/dix/events.c
index d63db95..452fc3b 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4142,6 +4142,9 @@ DeliverOneGrabbedEvent(InternalEvent *event, DeviceIntPtr dev,
     GrabPtr grab = grabinfo->grab;
     Mask filter;
 
+    if (grab->grabtype != level)
+        return 0;
+
     switch (level) {
     case XI2:
         rc = EventToXI2(event, &xE);
-- 
1.8.3.1



More information about the xorg-devel mailing list