From 4c00278c827ec0b9e3350a5562f90267f56cfd26 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Thu, 2 Aug 2012 01:09:41 +0300 Subject: [PATCH] Remove xproto build dependency Very little left to do for this. Signed-off-by: Ran Benita --- configure.ac | 2 +- src/text.c | 23 +++++++++++++++-------- src/xkb-priv.h | 1 - src/xkbcomp/action.c | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 6cdaa48..b5a83bc 100644 --- a/configure.ac +++ b/configure.ac @@ -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` diff --git a/src/text.c b/src/text.c index 6137860..d4d63ba 100644 --- a/src/text.c +++ b/src/text.c @@ -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 diff --git a/src/xkb-priv.h b/src/xkb-priv.h index e4f99d2..9541013 100644 --- a/src/xkb-priv.h +++ b/src/xkb-priv.h @@ -84,7 +84,6 @@ #include #include #include -#include #include "xkbcommon/xkbcommon.h" #include "utils.h" diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c index 418ec31..e5632f3 100644 --- a/src/xkbcomp/action.c +++ b/src/xkbcomp/action.c @@ -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); } } -- 2.7.4