[PATCH] dix: report XI1 axis values correctly if first_valuator != 0

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 22 18:22:53 PDT 2009


On Tue, Sep 22, 2009 at 09:12:01PM -0400, Thomas Jaeger wrote:
> This raises an interesting question, though:  How are applications
> supposed to keep track of the valuators they're interested in if events
> only contain partial valuator information?  XI1 clients can select for
> DeviceState and all Motion events to ensure they are always aware of the
> valuator state, which seems a little wasteful but at least it'll work.
> I see no way for XI2 clients to accomplish the same thing.

I hope I understand this correctly:
The mask in each event specifies which valuators are set.
- for relative axes, there's no "keeping track" anyway. So the first event
  that has the matching valuator set matters.
- for absolute axes, you get the initial state from the XIQueryDevice call
  and then subsequent values through the events. if an event never contains
  the valuator you need, it's value is unchanged from the original one.

Does that answer the question?

Cheers,
  Peter


More information about the xorg-devel mailing list