[RFC PATCH v2] protocol: Extend wayland seat with interfaces for sensor inputs.

Bill Spitzak spitzak at gmail.com
Thu Aug 22 13:20:56 PDT 2013



Jason Ekstrand wrote:

>     One thing I'm still missing is a way to handle more than one sensor
>     per type for the future. Input devices like the wii-remote with
>     nunchuk comes to mind. Having two separate accelerometers which
>     still would be a the same seat but could not be aggregated.
> 
> 
> Yes, this is kind of an issue.  There was some work recently on adding 
> gamepad support and that faced similar issues.  For reference, see 
> http://lists.freedesktop.org/archives/wayland-devel/2013-May/009043.html 
> and the ~42 replies.

It seems wrong to me that the count is split into two parts. For 
instance if there are two accelerometers:

  1. The fact that it is non-zero is stored in a bit in the seat description

  2. Whether it is 1, 2, 3, etc is in a different undefined api.

There have also been some worry about running out of bits in the seat 
flags, too.

Why not have an api that takes a seat and returns a big list of every 
device and every event that each device can produce. Yes that seems big 
but it is on the order of thousands and would be sent in one big block, 
not as thousands of messages. I think the type of device can be 
determined from the set of events it produces, though I guess you can 
also put a type id on the device.


More information about the wayland-devel mailing list