diff --git a/dix/events.c b/dix/events.c index 29033e2e5..45d9eabea 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; }