Hi, On 3 March 2014 05:44, Peter Hutterer <[email protected]> wrote: > +static int > +_XkbWantStateNotify(XkbSrvInfoPtr xkbi) > +{ > + Bool genStateNotify; > + > + /* The state may change, so if we're not in the middle of sending a state > + * notify, prepare for it */ > + if ((xkbi->flags & _XkbStateNotifyInProgress) == 0) { > + xkbi->prev_state = xkbi->state; > + xkbi->flags |= _XkbStateNotifyInProgress; > + genStateNotify = TRUE; > + } > + else > + genStateNotify = FALSE; > + > + return genStateNotify; > +}
This would be better with early return, and the function name is also misleading: something like _XkbEnsureStateChange() or similar would be nice. Cheers, Daniel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
