X server testing
Peter Hutterer
peter.hutterer at who-t.net
Thu Jun 25 17:29:29 PDT 2009
On Thu, Jun 25, 2009 at 09:25:03AM +0200, Simon Thum wrote:
> Thomas Jaeger wrote:
>> I suppose first_valuator might be useful if a device wants to post only
>> a certain set of valuators. We might actually see more of this as
>> devices (hopefully) gain more valuators (wheel axes, proximity axes etc).
> If it is really a sensible case to do partial motion posts (Peter?), why
> is it you can only perform it for adjacent valuators? I suspect it's a
> questionable optimization, which IMO comes at the expense of
> maintainability.
>
> There should be two lists: one with values, one optional with indexes
> (if different from {0,1,2,..n}). Internal events already have a valuator
> mask (though there are still some assumptions about adjacency, e.g. in
> countValuators)
>
> Meanwhile, bail out on non-zero first_val in xf86PostMotion and throw
> out first_valuator by assuming zero. But I must say that this is a
> larger change than I had anticipated first, and simply assuming zero
> won't really do the cut in all affected areas.
Bear in mind that this API has been around since the XFree86 -> X.Org
switch, so this here is guesswork from my side:
XI allows sending multiple valuators (more than 2) in events. The 32 byte
restriction required that valuators that don't fit into the first event must
be sent in additional events. These events are then accumulated in the
client.
The first_valuator and num_valuators spawns from that. If you get a valuator
event that can contain up to 6 valuators, you need to know how many you
actually have (num_valuators) and which one the first one is
(first_valuator). I guess that the driver API was designed after this.
It is definitely a sensible case. A device may post x + pressure coordinates
in one event but not y. ATM, we either need to split up the event into two
or fill in y from the last known state to get the continuous valutor
information required for the (first + num) notation.
I toyed with the idea of fixing this, but it's not something on the top of
the priority list for me. As you noticed, the internal events don't use this
notion anymore and neither does XI2. Feel free to fix this, though it's not
a quick change. All drivers will need fixing, GPE and friends would need
fixing, etc. And since it's an input API/ABI change, you'll need to either
hurry to get it in or wait for the next release cycle.
Cheers,
Peter
More information about the xorg-devel
mailing list