[RFC v2 libinput 0/2] Buttonset interface - numbered axes

Peter Hutterer peter.hutterer at who-t.net
Sat Mar 21 16:20:35 PDT 2015


On Fri, Mar 20, 2015 at 09:54:30AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 20-03-15 01:38, Peter Hutterer wrote:
> >On Fri, Mar 20, 2015 at 10:19:06AM +1000, Peter Hutterer wrote:
> >[...]
> >>>5) If a device has multiple axes of the same type, is the order
> >>>supposed to be ABI? Example: gamepads tend to have two analog-sticks.
> >>>How do applications reliably find the left and right stick?
> >>
> >>well, our promise is that the same device will come up in the same order of
> >>axes. so once you figure out that the left stick is the first, you can rely
> >>on it always being the first on that device.
> >>
> >>if the kernel driver changes out from underneath us that could be
> >>interesting but then again that'd be an argument for a kernel regression :)
> >
> >one clarification here:
> >the intention was that the axis order is fixed within the type, but may
> >otherwise change over time.
> >i.e. if you have two RING axes, they'll stay the same order but they do
> >_not_ always have the same axis number.
> >
> >The device may have X, Y, Z, RING, RING but change to X, Y, Z, WHEEL,
> >RING, RING in the future. Or even X, RING, Y, RING, Z.
> >
> >We only guarantee that the first ring is the same ring as before. in other
> >words, the axis number is _not_ ABI, it's just an index.
> >
> >(This was prompted by Jason's reply re:accelerometers in the 27QHD, we may
> >not support them now but if they are added in the future they may slot in at
> >any position.)
> 
> This is somewhat unfortunate, but as I think about a way around it, this seems
> unavoidable. So I think this is fine, but it needs to be very clearly documented
> somewhere else then in this mailinglist post.

I've added a note to my local tree, next version will have the
documentation.

Cheers,
   Peter


More information about the wayland-devel mailing list