[PATCH 2/2] dix: use helper functions in EventIsDeliverable
Keith Packard
keithp at keithp.com
Wed Aug 10 18:50:07 PDT 2011
On Thu, 11 Aug 2011 11:13:28 +1000, Peter Hutterer <peter.hutterer at who-t.net> wrote:
This sequence looks a *lot* nicer. Someday we'll be able to understand
the XI2 code.x
> + if ((type = GetXIType(event)) != 0)
> + {
> + filter = GetEventFilterMask(dev, type);
> +
> + /* Check for XI mask */
> + if (type && inputMasks &&
Don't need to recheck 'type' here.
> + (inputMasks->deliverableEvents[dev->id] & filter) &&
> + (inputMasks->inputEvents[dev->id] & filter))
> + rc |= EVENT_XI1_MASK;
> +
> + /* Check for XI DontPropagate mask */
> + if (type && inputMasks &&
Or here.
> + (inputMasks->dontPropagateMask[dev->id] & filter))
> + rc |= EVENT_DONT_PROPAGATE_MASK;
> +
> + }
> +
> + if ((type = GetCoreType(event)) != 0)
> + {
> + filter = GetEventFilterMask(dev, type);
> +
> + /* Check for core mask */
> + if (type && (win->deliverableEvents & filter) &&
Not even here.
> + ((wOtherEventMasks(win) | win->eventMask) & filter))
> + rc |= EVENT_CORE_MASK;
> +
> + /* Check for core DontPropagate mask */
> + if (type && (filter & wDontPropagateMask(win)))
And, not here.
> + rc |= EVENT_DONT_PROPAGATE_MASK;
> + }
>
> return rc;
> }
> --
> 1.7.6
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110810/a5b8fd3c/attachment.pgp>
More information about the xorg-devel
mailing list