[PATCH] dix: Always add valuator information if present
Magnus Vigerlöf
Magnus.Vigerlof at home.se
Sun Dec 16 09:12:41 PST 2007
On söndag 16 december 2007, Daniel Stone wrote:
> On Sun, Dec 16, 2007 at 02:25:10PM +0100, Magnus Vigerlöf wrote:
> > Send valuator information with all event types, not only for
> > MotionEvents and absolute button events. Relative button events
> > will have the coordinate set to 0,0 for the extended event
> > unless this information is included.
>
> Er, except they won't, because DeviceKeyButtonPointer includes both
> event_{x,y} and root_{x,y}, so you always have the first two axes (as I
> just verified with people.fd.o/~daniels/xiread.c and my trackpoint). If
> you want to get extended axes, hmm. Okay, turns out I misread the spec,
> and it said that relative devices _may_ report all zeros in the valuator
> fields, not must, as I thought. I'll merge a slightly modified version;
> only send separate valuators if there are more than two, or it's a
> motion notify.
Hmmm... Ok, I'm not so familiar with the spec, of the thoughts behind how
events should be generated. I only saw a difference in behaviour and checked
what was different..
As long as the net result will be that the coordinates in the InputDevice
coordinate space will be included in the event that reaches the XClient (for
example Gimp that doesn't look at the screen-scaled x&y, but will use the
high-resolution axis that a Wacom tablet will provide).
The linuxwacom driver always send 6 axis so it shouldn't be a problem for us.
But if we have a slightly more simple device which only have two axis and a
few buttons (I'm not sure if acecad falls into this category), won't the
above restrictions ensure that the extended axes will get '0' again?
Cheers
Magnus
More information about the xorg
mailing list