Don't send compositor's global key bindings to the input method
Although weston_compositor_run_key_binding() is called when the current keyboard grab is default_grab or input_method_grab, swallowing the key event is processed only on default_grab. As a result key events that should be swallowed are sent to the input method unexpectedly. For example, when a user press `Super + s` on weston-editor to take a screen shot, `s` will be unexpectedly entered to the text area. I confirmed such behaviour with weston-simple-im and fcitx5-5.0.10. It doesn't occur with weston-keyboard because it doesn't install keyboard grab. Signed-off-by: Takuro Ashie <ashie@clear-code.com>
This commit is contained in:
committed by
Marius Vlad
parent
29d4472e13
commit
351e6a4b21
@@ -310,8 +310,8 @@ weston_compositor_run_key_binding(struct weston_compositor *compositor,
|
|||||||
/* If this was a key binding and it didn't
|
/* If this was a key binding and it didn't
|
||||||
* install a keyboard grab, install one now to
|
* install a keyboard grab, install one now to
|
||||||
* swallow the key press. */
|
* swallow the key press. */
|
||||||
if (keyboard->grab ==
|
if (keyboard->grab == &keyboard->default_grab ||
|
||||||
&keyboard->default_grab)
|
keyboard->grab == &keyboard->input_method_grab)
|
||||||
install_binding_grab(keyboard,
|
install_binding_grab(keyboard,
|
||||||
time,
|
time,
|
||||||
key,
|
key,
|
||||||
|
|||||||
Reference in New Issue
Block a user