Gamepad focus model (Re: Input and games.)

Daniel Stone daniel at fooishbar.org
Mon May 13 08:24:29 PDT 2013


Hi,

On 13 May 2013 07:14, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Mon, 13 May 2013 09:12:03 +1000
> Peter Hutterer <peter.hutterer at who-t.net> wrote:
>> > Those were exactly my thoughts in the beginning, however during the way
>> > long email thread, I got convinced otherwise for now. There are a few
>> > issues that come mind:
>> > - how to know, when one seat should follow the keyboard(?) focus of
>> >   another seat?
>>
>> I wonder when this is necessary. unless I'm misunderstanding something this
>> should only be of concern when both users want to change games (or otherwise
>> between clients)?
>
> I would imagine, that two players each with own gamepads is a more
> common case when playing the same game on split-screen or alike, than
> playing two different games. Therefore, when the game is started, the
> display server would ideally somehow know to assing both gamepad foci
> to the game window.
>
> The basic assumption with seats is that each is independent, but the
> server is of course free to assign foci as it chooses. This is just a
> server implementation detail.
>
> But I guess it does not really matter how it is on the protocol level,
> there would need to be a "focus group" configuration in the server
> anyway; either by protocol allowing several gamepad in one wl_seat, or
> a purely server detail by focus groups containing wl_seats.
>
> I think this is not a protocol question as much as a server
> implementation consideration, so... *shrug*.

I know I've had some trouble expressing my problems with the
every-gamepad-in-a-seat proposal, but this pretty much hits the nail
on the head.  How does the gamepad's focus get assigned (and change)
if it's in its own seat? Does it always follow the focus of another
wl_seat? If so, why have we created another wl_seat? Is it only to
contain a wl_gamepad and nothing else - if so, why are we using seats
as an indirection layer? Or do some gamepads go into the seat with the
pointer and keyboard and others go into their own seats - if so, isn't
that totally arbitrary and more than a little confusing?

If the focus can be changed independently, how does this happen? If
the keyboard/pointer seat switches focus to another game, do both
seats switch, or does the other stay behind? If both switch - why are
we complicating the focus model rather than just adding both to a
seat?

The wl_seat == one player idea is a nice little mental model, but it's
not in any way worth complicating our core input/focus management
model for.

Cheers,
Daniel


More information about the wayland-devel mailing list