[mutter] meta_display_get_keybinding_action: remove keysym parameter



commit 03578b69f38b11a8d0a3238e4696395570ef8849
Author: Dan Winship <danw gnome org>
Date:   Thu Oct 14 11:24:38 2010 -0400

    meta_display_get_keybinding_action: remove keysym parameter
    
    meta_display_process_key_event() always looks up events based on the
    "default" keysym for the keycode, so we should do the same here. This
    fixes, eg, the lookup of Shift-Alt-Tab (which would otherwise be
    unrecognized because the keysym would be XK_ISO_Left_Tab rather than
    XK_Tab).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632155

 src/core/keybindings.c |    9 ++++-----
 src/include/display.h  |    1 -
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 86892cf..7712748 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -502,21 +502,21 @@ display_get_keybinding (MetaDisplay  *display,
 /**
  * meta_display_get_keybinding_action:
  * @display: A #MetaDisplay
- * @keysym: Key symbol
  * @keycode: Raw keycode
  * @mask: Event mask
  *
- * Returns: The action that should be taken for the given key, or %META_KEYBINDING_ACTION_NONE.
- *
+ * Returns: The action that should be taken for the given key, or
+ * %META_KEYBINDING_ACTION_NONE.
  */
 MetaKeyBindingAction
 meta_display_get_keybinding_action (MetaDisplay  *display,
-                                    unsigned int  keysym,
                                     unsigned int  keycode,
                                     unsigned long mask)
 {
   MetaKeyBinding *binding;
+  KeySym keysym;
 
+  keysym = XKeycodeToKeysym (display->xdisplay, keycode, 0);
   mask = mask & 0xff & ~display->ignored_modifier_mask;
   binding = display_get_keybinding (display, keysym, keycode, mask);
 
@@ -2778,7 +2778,6 @@ process_workspace_switch_grab (MetaDisplay *display,
       MetaKeyBindingAction action;
 
       action = meta_display_get_keybinding_action (display,
-                                                   keysym,
                                                    event->xkey.keycode,
                                                    display->grab_mask);
 
diff --git a/src/include/display.h b/src/include/display.h
index ee63fda..d7b88f8 100644
--- a/src/include/display.h
+++ b/src/include/display.h
@@ -125,7 +125,6 @@ void     meta_display_end_grab_op   (MetaDisplay *display,
 MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
 
 MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay  *display,
-                                                         unsigned int  keysym,
                                                          unsigned int  keycode,
                                                          unsigned long mask);
 



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