upcoming xi2 and current XTest implementation

Peter Hutterer peter.hutterer at who-t.net
Fri May 29 18:22:13 PDT 2009


On Fri, May 29, 2009 at 03:42:02PM +0200, Simon Thum wrote:
> Peter Hutterer wrote:
>> The protocol only cares about the device id, so to make XTest XI2 aware, all
>> that's needed is some libXtst functions that take an id directly instead of
>> the XDevice*. So it's a pure client-side change in the library, feel free to
>> send me the patch :)
> I wonder if one couldn't just do a Xi1 XOpenDevice() to 'convert'  
> Id->Device* ? Any known reasons?

I'm not sure I understand what you mean, but
- XOpenDevice() is an XI 1 call and I really encourage not to mix XI1 and
  XI2.
- XOpenDevice() does and can only do 8 bit deviceids
- XOpenDevice() is actually a protocol request (that also performs stuff
  such as enabling the opened device on the server) so it's quite expensive
  for simply an ID conversion
- XOpenDevice() can result in BadDevice errors, especially for the VCP/VCK.


Cheers,
  Peter



More information about the xorg mailing list