[PATCH 27/42] dix: add helper functions for adding/removing touch listeners
Peter Hutterer
peter.hutterer at who-t.net
Mon Dec 19 19:27:51 PST 2011
On Mon, Dec 19, 2011 at 07:20:38PM -0800, Chase Douglas wrote:
> On Dec 14, 2011, at 7:02 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
>
> [snip]
>
> > +static void
> > +TouchAddActiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
> > + InternalEvent *ev, GrabPtr grab)
> > +{
> > + if (!ti->emulate_pointer &&
> > + (grab->grabtype == CORE || grab->grabtype == XI))
> > + return;
> > +
> > + if (!ti->emulate_pointer &&
> > + grab->grabtype == XI2 &&
> > + (grab->type != XI_TouchBegin && grab->type == XI_TouchEnd && grab->type == XI_TouchUpdate))
> > + return;
> > +
> > + TouchAddGrabListener(dev, ti, ev, grab);
>
> If I'm reading this right, we are adding the possibility of active grabs
> of touches. I didn't think that was part of the protocol.
If a client actively grabs the device for touch events, then it should get
the events, right? There's nothing in the protocol to prevent this.
> > +}
> > +
> > +void
> > +TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev)
> > +{
> > + int i;
> > + SpritePtr sprite = &ti->sprite;
> > + WindowPtr win;
> > +
> > + if (dev->deviceGrab.grab)
> > + TouchAddActiveGrabListener(dev, ti, ev, dev->deviceGrab.grab);
>
> Non-touch active grabs do not allow for replaying events. Shouldn't we
> continue this policy and return if an active grab was found?
this hunk is there for activated passive grabs and implicit passive grabs
which happen on pointer emulation.
Cheers,
Peter
More information about the xorg-devel
mailing list