[metacity] keybindings: don't grab keybindings without modmask



commit 5aeae2fcc6763839333372086ee2825d40f0d7b4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Apr 9 02:05:01 2015 +0300

    keybindings: don't grab keybindings without modmask

 src/core/keybindings.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index ea332b9..f06a53c 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -699,6 +699,15 @@ meta_change_keygrab (MetaDisplay *display,
    * X provides no better way to do this.
    */
 
+  if (modmask == 0)
+    {
+      meta_topic (META_DEBUG_KEYBINDINGS,
+                  "Will not %s keybinding %s without modmask\n",
+                  grab ? "grab" : "ungrab",
+                  keysym_to_string (keysym));
+      return;
+    }
+
   meta_topic (META_DEBUG_KEYBINDINGS,
               "%s keybinding %s keycode %d mask 0x%x on 0x%lx\n",
               grab ? "Grabbing" : "Ungrabbing",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]