diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-21 16:32:27 +1100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-22 14:06:38 +1100 |
commit | c158cf2b64034a49e1c95549603b684e21e7511a (patch) | |
tree | 1c93e75af2522d3d379d6f8e6b36b5ee679c935f /src | |
parent | dae1a78a521fa2e9fe7d058a66ae9ef7ea5d9471 (diff) |
Require XKB.
Welcome to the future.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 64 | ||||
-rw-r--r-- | src/evdev.h | 3 |
2 files changed, 23 insertions, 44 deletions
diff --git a/src/evdev.c b/src/evdev.c index 463b32a..dc5f055 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -41,9 +41,7 @@ #include <xf86Xinput.h> #include <exevents.h> #include <xorgVersion.h> -#ifdef XKB #include <xkbsrv.h> -#endif #include "evdev.h" @@ -839,43 +837,29 @@ EvdevAddKeyClass(DeviceIntPtr device) keySyms.minKeyCode = MIN_KEYCODE; keySyms.maxKeyCode = MIN_KEYCODE + ArrayLength(map) / GLYPHS_PER_KEY - 1; -#ifdef XKB - if (pEvdev->noXkb) -#endif - { - xf86Msg(X_CONFIG, "XKB: disabled\n"); - if (!InitKeyboardDeviceStruct((DevicePtr)device, &keySyms, modMap, - NULL, EvdevKbdCtrl)) - return !Success; - } -#ifdef XKB - else - { - /* sorry, no rules change allowed for you */ - xf86ReplaceStrOption(pInfo->options, "xkb_rules", "evdev"); - SetXkbOption(pInfo, "xkb_rules", &pEvdev->xkb_rules); - SetXkbOption(pInfo, "xkb_model", &pEvdev->xkb_model); - if (!pEvdev->xkb_model) - SetXkbOption(pInfo, "XkbModel", &pEvdev->xkb_model); - SetXkbOption(pInfo, "xkb_layout", &pEvdev->xkb_layout); - if (!pEvdev->xkb_layout) - SetXkbOption(pInfo, "XkbLayout", &pEvdev->xkb_layout); - SetXkbOption(pInfo, "xkb_variant", &pEvdev->xkb_variant); - if (!pEvdev->xkb_variant) - SetXkbOption(pInfo, "XkbVariant", &pEvdev->xkb_variant); - SetXkbOption(pInfo, "xkb_options", &pEvdev->xkb_options); - if (!pEvdev->xkb_options) - SetXkbOption(pInfo, "XkbOptions", &pEvdev->xkb_options); - - XkbSetRulesDflts(pEvdev->xkb_rules, pEvdev->xkb_model, - pEvdev->xkb_layout, pEvdev->xkb_variant, - pEvdev->xkb_options); - if (!XkbInitKeyboardDeviceStruct(device, &pEvdev->xkbnames, - &keySyms, modMap, NULL, - EvdevKbdCtrl)) - return !Success; - } -#endif + /* sorry, no rules change allowed for you */ + xf86ReplaceStrOption(pInfo->options, "xkb_rules", "evdev"); + SetXkbOption(pInfo, "xkb_rules", &pEvdev->xkb_rules); + SetXkbOption(pInfo, "xkb_model", &pEvdev->xkb_model); + if (!pEvdev->xkb_model) + SetXkbOption(pInfo, "XkbModel", &pEvdev->xkb_model); + SetXkbOption(pInfo, "xkb_layout", &pEvdev->xkb_layout); + if (!pEvdev->xkb_layout) + SetXkbOption(pInfo, "XkbLayout", &pEvdev->xkb_layout); + SetXkbOption(pInfo, "xkb_variant", &pEvdev->xkb_variant); + if (!pEvdev->xkb_variant) + SetXkbOption(pInfo, "XkbVariant", &pEvdev->xkb_variant); + SetXkbOption(pInfo, "xkb_options", &pEvdev->xkb_options); + if (!pEvdev->xkb_options) + SetXkbOption(pInfo, "XkbOptions", &pEvdev->xkb_options); + + XkbSetRulesDflts(pEvdev->xkb_rules, pEvdev->xkb_model, + pEvdev->xkb_layout, pEvdev->xkb_variant, + pEvdev->xkb_options); + if (!XkbInitKeyboardDeviceStruct(device, &pEvdev->xkbnames, + &keySyms, modMap, NULL, + EvdevKbdCtrl)) + return !Success; pInfo->flags |= XI86_KEYBOARD_CAPABLE; @@ -1563,8 +1547,6 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags) Note that this needs a server that sets the console to RAW mode. */ pEvdev->grabDevice = xf86CheckBoolOption(dev->commonOptions, "GrabDevice", 0); - pEvdev->noXkb = noXkbExtension; /* parse the XKB options during kbd setup */ - EvdevInitButtonMapping(pInfo); if (EvdevProbe(pInfo)) { diff --git a/src/evdev.h b/src/evdev.h index 2698b30..67fee1d 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -89,15 +89,12 @@ typedef struct { BOOL has_pressure; /* XKB stuff has to be per-device rather than per-driver */ - int noXkb; -#ifdef XKB char *xkb_rules; char *xkb_model; char *xkb_layout; char *xkb_variant; char *xkb_options; XkbComponentNamesRec xkbnames; -#endif /* Middle mouse button emulation */ struct { BOOL enabled; |