summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-04-14 15:09:39 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-13 09:41:36 +1000
commit2054ca73060a20b5a3025e8d5ef68182149484d3 (patch)
treeb2d7efaa3297d2849b279699aa72da7388cd4d5d /dix
parent236ed6f50675dc0303a505ac6f0418c515438fe1 (diff)
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>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/dix/events.c b/dix/events.c
index 77f871564..aeb37aa27 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -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;
}