[RFC wayland-protocols] inputfd - direct input access protocol

Carsten Haitzler (The Rasterman) raster at rasterman.com
Tue Apr 4 11:26:37 UTC 2017

On Tue, 04 Apr 2017 11:29:30 +0200 Bastien Nocera <hadess at hadess.net> said:

> On Tue, 2017-04-04 at 08:16 +0900, Carsten Haitzler wrote:
> > On Fri, 31 Mar 2017 17:29:19 +1000 Peter Hutterer <peter.hutterer at who
> > -t.net>
> > said:
> > 
> > If you're going to do this ... why not just do it for keyboards,
> > mice, touch
> > panels etc. too?
> > 
> > My point is - the same reasons these other devices don't be lazy and
> > stick
> > their heads in the sand with these other devices are the same reasons
> > joysticks, gamepads etc. etc. should also be UNDERSTOOD by the
> > compositor
> > before passing them on so they compositor can filter out special
> > buttons (eg a
> > power button and handle it internally, or a "home" button to go back
> > to the
> > home screen etc.).
> Just like the superb joystick support in X11, amirite? :)

well - do better. there already was a proposal to add joystick/gamepad protocol
support to wayland protocol a few months back but it was rejected. i think
that's a far better solution than this.

> The protocol is a well-known, extensible one (evdev), already supported
> by all the games on Linux that support joypads. And if it's not good
> enough, your compositor can choose not to pass the raw device node's
> file descriptor to the application, but pass a file descriptor with a
> simpler protocol, or pass the joypad events as key presses.
> Your compositor's choice.
> Demarshalling and remarshalling the protocol means you have a layer of
> indirection that's usually not necessary, and just makes it harder to
> support new features from the bottom of the stack upwards.

gamepads with power buttons. the wii controller has one. you want to filter
that out and not pass it to a client. just like keys. there are home buttons
too - same thing. menu buttons and so on. in some cases the game controller is
the ONLY interface you have to the device and so various buttons and actions
need trapping just like a keyboard or mouse do.

that's why i say - the same logic that applies to mouse and keyboard should
apply to all other input devices like joysticks etc. - so if just passing an fd
is "just fine" for a joystick then scrap all the kbd/mouse protocol and pass
those through directly too. that or do them the same way. the marshalling and
demarshalling are just fine for mice and keyboards (gaming mice can produce
1000, 2000 or even more events per second... so don't tell me that magically a
gamepad is special and needs low latency and so on but a gaming mouse does

> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel

------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com

More information about the wayland-devel mailing list