[PATCH 2/4] CheckDeviceGrabs: Delete redundant pWin->optional test.

Jamey Sharp jamey at minilop.net
Wed Aug 4 14:23:03 PDT 2010


CheckPassiveGrabsOnWindow returns FALSE if pWin->optional is NULL,
because wPassiveGrabs uses wUseDefault, so don't bother checking at the
caller.

Signed-off-by: Jamey Sharp <jamey at minilop.net>
Cc: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index e03e58c..51a04d5 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3636,8 +3636,7 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, int checkFirst)
 	for (; i < focus->traceGood; i++)
 	{
 	    pWin = focus->trace[i];
-	    if (pWin->optional &&
-	        CheckPassiveGrabsOnWindow(pWin, device, event, sendCore))
+	    if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore))
 		return TRUE;
 	}
 
@@ -3651,8 +3650,7 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, int checkFirst)
     for (; i < device->spriteInfo->sprite->spriteTraceGood; i++)
     {
 	pWin = device->spriteInfo->sprite->spriteTrace[i];
-	if (pWin->optional &&
-	    CheckPassiveGrabsOnWindow(pWin, device, event, sendCore))
+	if (CheckPassiveGrabsOnWindow(pWin, device, event, sendCore))
 	    return TRUE;
     }
 
-- 
1.7.0



More information about the xorg-devel mailing list