CheckDeviceGrabs: Delete redundant pWin->optional test.

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@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Jamey Sharp 2010-08-03 19:49:59 -07:00 committed by Peter Hutterer
parent c360b3eb1d
commit 1c1811ecaf

View File

@ -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;
}