[mutter/wayland] display: Remove code to calculate the above-tab keycode



commit 2f229c3928be3af57cf17dd3d983571505adbc3c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 7 14:24:53 2014 -0400

    display: Remove code to calculate the above-tab keycode
    
    We always know it will be KEY_GRAVE + 8.

 src/Makefile.am              |    1 -
 src/core/above-tab-keycode.c |  241 ------------------------------------------
 src/core/display-private.h   |    4 -
 src/core/keybindings.c       |    8 +-
 4 files changed, 3 insertions(+), 251 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 2d6a7df..61cbb7a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -80,7 +80,6 @@ libmutter_wayland_la_SOURCES =                        \
        backends/x11/meta-xrandr-shared.h               \
        core/meta-accel-parse.c                 \
        core/meta-accel-parse.h                 \
-       core/above-tab-keycode.c                \
        core/barrier.c                          \
        meta/barrier.h                          \
        core/bell.c                             \
diff --git a/src/core/display-private.h b/src/core/display-private.h
index c46bafe..8209c8f 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -230,7 +230,6 @@ struct _MetaDisplay
   int             max_keycode;
   KeySym *keymap;
   int keysyms_per_keycode;
-  unsigned int above_tab_keycode;
   unsigned int ignored_modifier_mask;
   unsigned int hyper_mask;
   unsigned int super_mask;
@@ -463,9 +462,6 @@ void meta_display_accelerator_activate (MetaDisplay     *display,
                                         ClutterKeyEvent *event);
 gboolean meta_display_modifiers_accelerator_activate (MetaDisplay *display);
 
-/* In above-tab-keycode.c */
-guint meta_display_get_above_tab_keycode (MetaDisplay *display);
-
 #ifdef HAVE_XI23
 gboolean meta_display_process_barrier_event (MetaDisplay *display,
                                              XIEvent     *event);
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index f90127a..8aa247a 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -47,6 +47,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <linux/input.h>
+
 #include <xkbcommon/xkbcommon.h>
 
 #ifdef HAVE_XKB
@@ -184,10 +186,6 @@ reload_keymap (MetaDisplay *display)
   if (display->keymap)
     meta_XFree (display->keymap);
 
-  /* This is expensive to compute, so we'll lazily load if and when we first
-   * need it */
-  display->above_tab_keycode = 0;
-
   display->keymap = XGetKeyboardMapping (display->xdisplay,
                                          display->min_keycode,
                                          display->max_keycode -
@@ -317,7 +315,7 @@ get_keycodes_for_keysym (MetaDisplay  *display,
   /* Special-case: Fake mutter keysym */
   if (keysym == META_KEY_ABOVE_TAB)
     {
-      keycode = meta_display_get_above_tab_keycode (display);
+      keycode = KEY_GRAVE + 8;
       g_array_append_val (retval, keycode);
       goto out;
     }


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