Gamepad focus model (Re: Input and games.)
Daniel Stone
daniel at fooishbar.org
Tue May 14 07:40:00 PDT 2013
(Still digesting the rest of the thread.)
On 14 May 2013 08:11, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> the other thing that made me thing about your approach:
> with the gamepad_manager, you've got an extra layer in the tree for gamepads
> that pointers/keyboards don't have. that's not a bad thing and focus
> handling is easier this way, but now you could also look at pointers and
> keyboards and see if that extra layer is useful for those two. And I think
> it would be - e.g. wacom devices share their focus with the pointer, but
> also have their device-specific stuff that clients may need.
The reason that's there is because Wayland is heavily object-driven.
Rather than firing out event selections, you mostly register for
events by binding to interfaces which send them. So, you need
wl_gamepad_manager to support more than one gamepad per seat; you
could have the seat send out new gamepad events directly, but then you
don't have any way to unregister for those events - so we use
wl_gamepad_manager, and when it's destroyed, you don't get new events
from it.
Cheers,
Daniel
More information about the wayland-devel
mailing list