summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Hlusiak <saschahlusiak@arcor.de>2009-02-02 00:10:42 +0100
committerSascha Hlusiak <saschahlusiak@arcor.de>2009-02-02 00:10:42 +0100
commit4671904035d4da4d112f53cce8781bcc77b0d0db (patch)
tree05249f1cdf7cf737cbe5d20fce416d7bcc15e27a
parent3984947ada771619f21b511507a2fb9cca3ed645 (diff)
Use InitKeyboardDeviceStruct instead of nonexistant XkbInitKeyboardDeviceStruct
Realizing XkbInitKeyboardDeviceStruct has been removed, we do need to use InitKeyboardDeviceStruct. This breaks custom keymaps on ABI_XINPUT_VERSION >= 5. Hopefully this can be reimplemented later.
-rw-r--r--src/jstk_key.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/jstk_key.c b/src/jstk_key.c
index ad5b3bd..4e9f710 100644
--- a/src/jstk_key.c
+++ b/src/jstk_key.c
@@ -109,11 +109,26 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv)
}
}
- XkbInitKeyboardDeviceStruct (pJstk, &xkbnames, &keySyms, modMap,
- NULL, jstkKbdCtrl);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
+ {
+ XkbRMLVOSet rmlvo;
+ XkbGetRulesDflts(&rmlvo);
+ /* FIXME */
+ #warning KEYMAP FOR ABI_XINPUT_VERSION >= 5 BROKEN RIGHT NOW
+ if (!InitKeyboardDeviceStruct(pJstk, &rmlvo, NULL, jstkKbdCtrl))
+ {
+ ErrorF("unable to init keyboard device\n");
+ return !Success;
+ }
+ }
+#else
+ if (InitKeyboardDeviceStruct((DevicePtr)pJstk, &keySyms, modMap, NULL, jstkKbdCtrl) == FALSE) {
+ ErrorF("unable to init keyboard device\n");
+ return !Success;
+ }
+#endif
/* Set Autorepeat and Delay */
-
if ((priv->repeat_delay || priv->repeat_interval) &&
pJstk->key &&
pJstk->key->xkbInfo)