diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-12-26 18:38:25 +1100 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-01-22 15:08:51 +1100 |
commit | 08363c5830bdea34012dcd954b45ccfdc79a3a7e (patch) | |
tree | 67475a96ca4c23bcacb626b02eb4ab2f8602a742 /hw/kdrive/src | |
parent | 40877c6680863bd6a8475f2bb0c54df55bcf0b0e (diff) |
Input: Overhaul keyboard initialisation process
XkbInitKeyboardDeviceStruct is now the only valid keyboard
initialisation: all the details are hidden behind here. This now makes
it impossible to supply a core keymap at startup.
If dev->key is valid, dev->key->xkbInfo->desc is also valid.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/kdrive/src')
-rw-r--r-- | hw/kdrive/src/kinput.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 670cc372f..92f5216e5 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -746,7 +746,7 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) DevicePtr pDev = (DevicePtr)pDevice; KdKeyboardInfo *ki; Atom xiclass; - XkbComponentNamesRec names; + XkbRMLVOSet rmlvo; if (!pDev) return BadImplementation; @@ -795,16 +795,13 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) KdInitModMap(ki); KdInitAutoRepeats(ki); - memset(&names, 0, sizeof(XkbComponentNamesRec)); - - XkbSetRulesDflts (ki->xkbRules, ki->xkbModel, ki->xkbLayout, - ki->xkbVariant, ki->xkbOptions); - - ret = XkbInitKeyboardDeviceStruct (pDevice, - &names, - &ki->keySyms, - ki->modmap, - KdBell, KdKbdCtrl); + memset(&rmlvo, 0, sizeof(rmlvo)); + rmlvo.rules = ki->xkbRules; + rmlvo.model = ki->xkbModel; + rmlvo.layout = ki->xkbLayout; + rmlvo.variant = ki->xkbVariant; + rmlvo.options = ki->xkbOptions; + ret = InitKeyboardDeviceStruct (pDevice, &rmlvo, KdBell, KdKbdCtrl); if (!ret) { ErrorF("Couldn't initialise keyboard %s\n", ki->name); return BadImplementation; |