[PATCH xserver] XKB: Redirect actions defunct with Gtk3 (XInput?)

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 21 22:02:25 PST 2012


On Tue, Feb 21, 2012 at 08:43:45PM +0100, wettstein509 at solnet.ch wrote:
> > > +    ev.deviceid = ev.sourceid = xkbi->device->id;
> > 
> > not sure about this one. the actual device and source ID is in the caller
> > and you need to pass this down. they aren't always the same.
> 
> Do you know if either ev.deviceid or ev.sourceid should always be equal
> to xkbi->device->id?  In that case, I could pass the other ID through
> filter->priv.  Otherwise, I would have to change the function signature.
> This will have ripple effects, as the signature is fixed in
> XkbFilterRec.

general rule:
    ev.deviceid is the device id of the device the event is posted for.
    ev.sourceid is the device id of the device the event originated from.
so if you get an event through a master device, the deviceid will be the
master's ID while the sourceid will be the slave device ID that generated
the event. 

XKB actions don't work across devices, so in this case this means that
xkbi->device->id == ev.deviceid, so you can take this shortcut here (add a
comment though please).

Cheers,
  Peter


More information about the xorg-devel mailing list