[PATCH 05/11] dix: move the grab activation condition into a if block.
Peter Hutterer
peter.hutterer at who-t.net
Tue May 10 21:49:44 PDT 2011
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 at who-t.net>
---
dix/events.c | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 35548ea..a8bfa72 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2181,24 +2181,26 @@ 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 (IsButtonPressEvent(pEvents) && deliveries && (!grab))
- ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask);
- 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 (IsButtonPressEvent(pEvents) && (!grab))
+ ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask);
+ 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;
}
--
1.7.4.4
More information about the xorg-devel
mailing list