On Wed, May 11, 2011 at 02:11:56PM -0700, Jamey Sharp wrote: > That's clearly a win. > > Reviewed-by: Jamey Sharp <[email protected]> > > I'd replace "else { if ... }" with "else if ..." in the same patch, but > it doesn't matter.
amended, thanks. Cheers, Peter > On Wed, May 11, 2011 at 02:49:44PM +1000, Peter Hutterer wrote: > > Rather than 3 conditions with if (deliveries && ...), have one block with > > the three in them. > > No functional changes. > > > > Signed-off-by: Peter Hutterer <[email protected]> > > --- > > 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 > > > > _______________________________________________ > > [email protected]: X.Org development > > Archives: http://lists.x.org/archives/xorg-devel > > Info: http://lists.x.org/mailman/listinfo/xorg-devel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
