Input: Remove core keysyms from KeyClassRec

Instead of always keeping two copies of the keymap, only generate the
core keymap from the XKB keymap when we really need to, and use the XKB
keymap as the canonical keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone
2008-10-18 20:26:00 +01:00
parent bc909f7136
commit 4fa3872dc2
16 changed files with 211 additions and 265 deletions

View File

@@ -64,6 +64,8 @@ SOFTWARE.
#include "exglobals.h" /* FIXME */
#include "exevents.h"
#include "xace.h"
#include "xkbsrv.h"
#include "xkbstr.h"
#include "listdev.h"
@@ -211,8 +213,8 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf)
k2 = (xKeyInfoPtr) * buf;
k2->class = KeyClass;
k2->length = sizeof(xKeyInfo);
k2->min_keycode = k->curKeySyms.minKeyCode;
k2->max_keycode = k->curKeySyms.maxKeyCode;
k2->min_keycode = k->xkbInfo->desc->min_key_code;
k2->max_keycode = k->xkbInfo->desc->max_key_code;
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
if (client && client->swapped) {
swaps(&k2->num_keys, n);