input: swallow the key press event when running a compositor key binding
Reviewed-by: Daniel Stone <daniel.stone@collabora.com>
diff --git a/src/bindings.c b/src/bindings.c
index 5cb031a..8d4c133 100644
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -202,6 +202,9 @@
if (keyboard->input_method_resource)
keyboard->grab = &keyboard->input_method_grab;
free(b);
+ } else {
+ /* Don't send the key press event for the binding key */
+ return;
}
}
if (!wl_list_empty(&keyboard->focus_resource_list)) {
@@ -294,7 +297,7 @@
/* If this was a key binding and it didn't
* install a keyboard grab, install one now to
- * swallow the key release. */
+ * swallow the key press. */
if (seat->keyboard->grab ==
&seat->keyboard->default_grab)
install_binding_grab(seat, time, key, focus);