input: don't send to clients key events eaten by bindings
authorGiulio Camuffo <giuliocamuffo@gmail.com>
Tue, 11 Nov 2014 09:23:40 +0000 (11:23 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 11 Nov 2014 13:07:12 +0000 (15:07 +0200)
commit5c11fc6fb7d9b1bccd50fc982c0798c9e09a2a04
treee7516ae03af35c38bbbb792aeb451f9d3af7c6c0
parent86b70e16ebbaa6f1c0ec1a4bd6e88a51710d60f0
input: don't send to clients key events eaten by bindings

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.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/bindings.c
src/compositor.h
src/input.c