Remove xproto build dependency
authorRan Benita <ran234@gmail.com>
Wed, 1 Aug 2012 22:09:41 +0000 (01:09 +0300)
committerRan Benita <ran234@gmail.com>
Tue, 7 Aug 2012 10:20:37 +0000 (13:20 +0300)
Very little left to do for this.

Signed-off-by: Ran Benita <ran234@gmail.com>
configure.ac
src/text.c
src/xkb-priv.h
src/xkbcomp/action.c

index 6cdaa48..b5a83bc 100644 (file)
@@ -83,7 +83,7 @@ if test "x$GCC" = xyes ; then
 fi
 
 # Obtain protocols headers include directives
-PKG_CHECK_MODULES([X11], [xproto kbproto >= 1.0.4])
+PKG_CHECK_MODULES([X11], [kbproto >= 1.0.4])
 
 # Define a configuration option for the XKB config root
 xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config`
index 6137860..d4d63ba 100644 (file)
@@ -128,15 +128,22 @@ VModMaskText(struct xkb_keymap *keymap, xkb_mod_mask_t modMask,
     return rtrn;
 }
 
+/*
+ * IMPORTATNT
+ * The indices used for the legacy core modifiers is derived from
+ * the order of the names in this table. It matches the values
+ * ShiftMapIndex, LockMapIndex, etc. from X11/X.h. Take note before
+ * changing.
+ */
 static const char *modNames[XkbNumModifiers] = {
-    [ShiftMapIndex]   = "Shift",
-    [LockMapIndex]    = "Lock",
-    [ControlMapIndex] = "Control",
-    [Mod1MapIndex]    = "Mod1",
-    [Mod2MapIndex]    = "Mod2",
-    [Mod3MapIndex]    = "Mod3",
-    [Mod4MapIndex]    = "Mod4",
-    [Mod5MapIndex]    = "Mod5",
+    "Shift",
+    "Lock",
+    "Control",
+    "Mod1",
+    "Mod2",
+    "Mod3",
+    "Mod4",
+    "Mod5",
 };
 
 xkb_mod_index_t
index e4f99d2..9541013 100644 (file)
@@ -84,7 +84,6 @@
 #include <strings.h>
 #include <syslog.h>
 #include <X11/extensions/XKB.h>
-#include <X11/X.h>
 
 #include "xkbcommon/xkbcommon.h"
 #include "utils.h"
index 418ec31..e5632f3 100644 (file)
@@ -1166,7 +1166,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
         action->dflt.value = 1;
     }
     else if (action->type == XkbSA_ISOLock) {
-        action->iso.real_mods = LockMask;
+        action->iso.real_mods = ModNameToIndex(XKB_MOD_NAME_CAPS);
     }
 }