upcoming xi2 and current XTest implementation
peter.hutterer at who-t.net
Thu May 28 18:13:58 PDT 2009
On Thu, May 28, 2009 at 03:27:17PM +0200, Christian Beier wrote:
> Hi there,
> with the merge of xi2 coming next week, I wonder what the status of
> XTest with xi2 is. Right now, XTest still pretty much looks like XI
> 1.x, with Device*'s instead of devive ids
> Looking at the upcoming libXi in Peters repo, I can see that it only
> offers XIChangeHierarchy() to create MD's, so MPX with the new libXi
> uses device ids _only_ instead of the old Device*'s. So faking MD
> input via XTest wont't work for now or is there a xi2 xextproto branch
> somewhere that I'm missing?
if you look at the source for e.g. XTestFakeDeviceButtonEvent, you'll see
that all the XDevice* is used for is
request->deviceid = dev->device_id.
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 :)
There's more limitations once you hit more than 127 devices, but let's not
worry about that for now.
More information about the xorg