[PATCH xserver 10/17] Input: Handle grabs with no Xi 1.x equivalent

Daniel Stone daniel at fooishbar.org
Tue Dec 28 09:58:01 PST 2010


Don't try to search for an Xi 1.x grab in CheckPassiveGrabsOnWindow for
events with no Xi 1.x equivalent.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 dix/events.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 29033e2..45d9eab 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3415,9 +3415,9 @@ CheckPassiveGrabsOnWindow(
         tempGrab.detail.exact = event->detail.key;
         if (!match)
         {
-            tempGrab.type = GetXIType((InternalEvent*)event);
             tempGrab.grabtype = GRABTYPE_XI;
-            if (GrabMatchesSecond(&tempGrab, grab, FALSE))
+            if ((tempGrab.type = GetXIType((InternalEvent*)event)) &&
+                (GrabMatchesSecond(&tempGrab, grab, FALSE)))
                 match = XI_MATCH;
         }
 
-- 
1.7.2.3



More information about the xorg-devel mailing list