input: don't run modifier bindings when the kbd is grabbed
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 27 Nov 2013 09:34:32 +0000 (10:34 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 28 Nov 2013 06:49:31 +0000 (22:49 -0800)
We don't want bindings to be run while the keyboard is grabbed.
Otherwise the binding handler may grab the keyboard too, making
the old grab go away without even being cancelled.

src/bindings.c

index fb758d1..fe21ed6 100644 (file)
@@ -293,6 +293,9 @@ weston_compositor_run_modifier_binding(struct weston_compositor *compositor,
 {
        struct weston_binding *b;
 
+       if (seat->keyboard->grab != &seat->keyboard->default_grab)
+               return;
+
        wl_list_for_each(b, &compositor->modifier_binding_list, link) {
                weston_modifier_binding_handler_t handler = b->handler;