Gamepad focus model (Re: Input and games.)
Daniel Stone
daniel at fooishbar.org
Tue May 7 11:30:00 PDT 2013
Hi,
On 7 May 2013 16:14, Todd Showalter <todd at electronjump.com> wrote:
> On Tue, May 7, 2013 at 3:23 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>> Yeah, like Daniel said, there is no concept of a "return value".
>>
>> When a client creates a new object, the server can only either agree,
>> or disconnect the client with a protocol error. Any other behaviour
>> requires specialized handling, and causes a roundtrip, where the client
>> must either wait for a reply before continuing, or risk having further
>> requests ignored without any obvious way to know what got ignored in
>> the end. Both cases are unacceptable.
>
> Ok. I was assuming that cases where you had fundamental
> capability change in the server (ie: input devices appearing or
> disappearing) were rare and special enough to warrant a round trip.
There's another reason too: unifying the cold- and hotplug cases.
With the X model, where you have a roundtrip to enumerate devices and
their details, plus hotplug events, you have two codepaths and it gets
quite annoying. Wayland follows the udev model, where coldplug is
just a storm of hotplug events. If you really need to do strict
enumeration, you could do a roundtrip immediately after creating the
gamepad object in which all you do is destroy it, knowing that in
between those two happening, you've got all your device creation
events.
Cheers,
Daniel
More information about the wayland-devel
mailing list