compositor: Swallow binding key for bindings that don't set up a grab
This prevents passing the key press and release to the keyboard focus client.
diff --git a/src/compositor.c b/src/compositor.c
index d0d9075..44faa94 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1570,10 +1570,6 @@
weston_compositor_idle_release(compositor);
}
- if (device->keyboard_grab == &device->default_keyboard_grab)
- weston_compositor_run_binding(compositor, wd,
- time, key, 0, state);
-
update_modifier_state(wd, key, state);
end = device->keys.data + device->keys.size;
for (k = device->keys.data; k < end; k++) {
@@ -1586,6 +1582,10 @@
*k = key;
}
+ if (device->keyboard_grab == &device->default_keyboard_grab)
+ weston_compositor_run_binding(compositor, wd,
+ time, key, 0, state);
+
device->keyboard_grab->interface->key(device->keyboard_grab,
time, key, state);
}