[PATCH 3/5] xkb: use GPE for XKB fake motion events.

Peter Hutterer peter.hutterer at who-t.net
Thu Apr 15 23:33:19 PDT 2010


On Wed, Apr 14, 2010 at 10:10:27PM +0200, Simon Thum wrote:
> Am 14.04.2010 03:08, schrieb Peter Hutterer:
> > Section 4.6.1 of the XKB spec says that "the initial event always moves the
> > cursor the distance specified in the action [...]", so skip the
> > POINTER_ACCELERATE flag for GPE, it would cause double-acceleration.
> Sounds fine.
> 
> > +    events = InitEventList(GetMaximumEventsNum());
> > +    OsBlockSignals();
> > +    nevents = GetPointerEvents(events, ptr,
> > +                               MotionNotify, 0,
> > +                               gpe_flags, 0, 2, (int[]){x, y});
> > +    OsReleaseSignals();
> If you can be sure ptr is a XTEST device (which I assume is the normal
> case), you ought to be able to drop the signal blocking. In theory. If
> no, the xtest GPE should be checked as well ;)

In most cases it will be, but for events that are caused by detached slaves
that's not the case. And we're talking about PointerKeys here, which is
already a marginal enough use-case to not bother messing it up even further
:)

Cheers,
  Peter

> It's good you're catching up with those!
> 
> Reviewed-by: Simon Thum <simon.thum at gmx.de>


More information about the xorg-devel mailing list