[mutter/wayland: 14/15] accel-parse: Use libxkbcommon for keysym parsing



commit e70f336a0970ca9e971218746560af0a2a7fee97
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 7 11:12:14 2014 -0400

    accel-parse: Use libxkbcommon for keysym parsing
    
    This kills our dependency on GTK+ / GDK entirely.

 src/core/meta-accel-parse.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/core/meta-accel-parse.c b/src/core/meta-accel-parse.c
index da007a0..aec068c 100644
--- a/src/core/meta-accel-parse.c
+++ b/src/core/meta-accel-parse.c
@@ -26,7 +26,7 @@
 
 #include "meta-accel-parse.h"
 
-#include <gtk/gtk.h>
+#include <xkbcommon/xkbcommon.h>
 #include <string.h>
 #include <stdlib.h>
 
@@ -297,8 +297,8 @@ accelerator_parse (const gchar         *accelerator,
             }
           else
            {
-             keyval = gdk_keyval_from_name (accelerator);
-             if (keyval == GDK_KEY_VoidSymbol)
+              keyval = xkb_keysym_from_name (accelerator, XKB_KEYSYM_CASE_INSENSITIVE);
+             if (keyval == XKB_KEY_NoSymbol)
                {
                  error = TRUE;
                  goto out;
@@ -315,7 +315,7 @@ out:
     keyval = keycode = mods = 0;
 
   if (accelerator_key)
-    *accelerator_key = gdk_keyval_to_lower (keyval);
+    *accelerator_key = keyval;
   if (accelerator_keycode)
     *accelerator_keycode = keycode;
   if (accelerator_mods)


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