[PATCH v2] input: don't send to clients key events eaten by bindings
Bill Spitzak
spitzak at gmail.com
Fri Nov 7 14:25:07 PST 2014
You are right I was forgetting about the old discussion, and am getting
confused as to where the bug is.
IMHO the behavior when the client gets the focus currently is correct.
However it is broken when the client already has the focus and the
compositor gets a key. The patch you are proposing breaks the case that
works, rather than fixing the bad case.
The bug is "client with keyboard focus does not have correct values for
currently-pressed keys if if the compositor consumes a key event".
Currently the only way to change the client's key-down array is for it
to get a wl_keyboard::enter event, or a wl_keyboard::key event. So if
the client already has focus then the compositor has no way to update
the map to show the result of a key-down event that the compositor consumed.
My recommendation: compositor should send a redundant wl_keyboard::enter
event.
The client should also get a correct wl_keyboard::modifiers event.
The example with the Alt+x changing focus but then the x repeating when
alt is released has nothing to do with compositor shortcuts. A client
can have the exact same bug if Alt+x was a shortcut it handled itself.
If the repeating x is considered wrong, it is the client's responsibilty
to realize the Alt was pressed or held after the x was pressed and not
repeat the unshifted value.
On 11/07/2014 12:14 AM, giuliocamuffo at gmail.com wrote:
> Listen, there's no point in repeating the same thing over and over again. This doesn't work, as I've explained in http://lists.freedesktop.org/archives/wayland-devel/2014-October/017741.html
>
More information about the wayland-devel
mailing list