[PATCH v2] input: don't send to clients key events eaten by bindings

Giulio Camuffo giuliocamuffo at gmail.com
Thu Nov 6 11:55:38 PST 2014


2014-11-06 21:48 GMT+02:00 Bill Spitzak <spitzak at gmail.com>:
>
>
> On 11/06/2014 09:55 AM, Giulio Camuffo wrote:
>>
>> weston key bindings are supposed to eat the key events, and not pass it
>> on to clients, and indeed the wl_keyboard.key event is not sent. But
>> we must also not put the key in the keys array to pass to client with
>> the wl_keyboard.enter event, or else we may send the 'eaten' one too.
>> In the case of a key binding hiding a surface having the keyboard focus,
>> the shell may decide to give the focus to another surface, but that will
>> happen before the key is released, so the new focus surface will receive
>> the code of the bound key in the wl_keyboard.enter array.
>
>
> Why can't the client distinguish this from an actual key press after it got
> the focus?

It may, but that's not the point. The key was eaten by the compositor
binding, it must not be sent to the client.


More information about the wayland-devel mailing list