sourceid in XIRawEvents

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 13 14:57:00 PST 2011


On Fri, Feb 11, 2011 at 03:51:39PM +0100, Mark Dokter wrote:
> I noticed that the sourceid field in XIRawEvents is 0 while the
> XIDeviceEvent sourceid field gets filled with the correct id of a slave
> device.
> The code I wrote some time ago uses raw events and now I realized that I
> have the requirement to know from which device the event came from.
> Is this a bug or is this a deliberate behaviour (since the xinput
> utility also avoids printing source ids of raw events) ?

ah, crud. this is a bug in the XI2 spec or the library, depending how you
see it. the protocol doesn't provide a sourceid. I guess the libXi headers
have it thanks to a copy/paste bug.

Having said that, I can't remember the exact reason why raw events don't
have a source ID. Other than that the idea of raw events is that you'd be
listening to the SDs, not the MDs, and thus the need for sourceid isn't
really there.

Cheers,
  Peter



More information about the xorg mailing list