[mutter] keybindings: Apply the same fix for keycodes to the GrabAccelerator API



commit a3b8dcbd04f553b433dabe3e39364ee7d93f03d6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jan 6 18:43:12 2015 -0800

    keybindings: Apply the same fix for keycodes to the GrabAccelerator API

 src/core/keybindings.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index cd3f6f7..cfe5b89 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1423,7 +1423,9 @@ meta_display_grab_accelerator (MetaDisplay *display,
     }
 
   devirtualize_modifiers (keys, modifiers, &mask);
-  keycode = get_first_keycode_for_keysym (keys, keysym);
+
+  if (keysym != 0)
+    keycode = get_first_keycode_for_keysym (keys, keysym);
 
   if (keycode == 0)
     return META_KEYBINDING_ACTION_NONE;


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