dix: move the grab activation condition into a if block.

Rather than 3 conditions with if (deliveries && ...), have one block with
the three in them.
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
Peter Hutterer 2011-04-14 15:09:39 +10:00
parent 236ed6f506
commit 2054ca7306
1 changed files with 14 additions and 16 deletions

View File

@ -2173,24 +2173,22 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
}
}
/*
* Note that since core events are delivered first, an implicit grab may
* be activated on a core grab, stopping the XI events.
*/
if (deliveries && !grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
/* grab activated */;
else if ((type == MotionNotify) && deliveries)
pDev->valuator->motionHintWindow = pWin;
else
{
if ((type == DeviceMotionNotify || type == DeviceButtonPress) &&
deliveries)
CheckDeviceGrabAndHintWindow (pWin, type,
(deviceKeyButtonPointer*) pEvents,
grab, client, deliveryMask);
}
if (deliveries)
{
/*
* Note that since core events are delivered first, an implicit grab may
* be activated on a core grab, stopping the XI events.
*/
if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
/* grab activated */;
else if ((type == MotionNotify))
pDev->valuator->motionHintWindow = pWin;
else if (type == DeviceMotionNotify || type == DeviceButtonPress)
CheckDeviceGrabAndHintWindow (pWin, type,
(deviceKeyButtonPointer*) pEvents,
grab, client, deliveryMask);
return deliveries;
}
return nondeliveries;
}