---
 src/util.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/util.c b/src/util.c
index 3ca940f..491516e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -240,8 +240,18 @@ weston_compositor_run_binding(struct weston_compositor 
*compositor,
        wl_list_for_each(b, &compositor->binding_list, link) {
                if (b->key == key && b->button == button &&
                    b->modifier == device->modifier_state && state) {
-                       b->handler(&device->input_device,
-                                  time, key, button, state, b->data);
+                       if (key != 0) {
+                               /* Activate binding only if all keys
+                                * are up except the trigger key */
+                               if (device->input_device.keys.size == 4) {
+                                       b->handler(&device->input_device,
+                                                  time, key, button, state, 
b->data);
+                               }
+                       }
+                       else {
+                               b->handler(&device->input_device,
+                                          time, key, button, state, b->data);
+                       }
                        break;
                }
        }
-- 
1.7.4.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to