summaryrefslogtreecommitdiff
path: root/hw/xquartz/quartzKeyboard.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-17 12:42:01 -0700
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:08:55 +1100
commit32db27a7f867b503c2840ca7b815e96d10be9210 (patch)
treee92648cdf253abecbd8dd5491fc1678c5464d8c9 /hw/xquartz/quartzKeyboard.c
parentf062e90a95f9b7ae5458ef2100615e8ace9b66a7 (diff)
Input: Remove modifierMap from core
We already have modmap (in the exact same format!) in XKB, so just use that all the time, instead of duplicating the information. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xquartz/quartzKeyboard.c')
-rw-r--r--hw/xquartz/quartzKeyboard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 21736d190..9e8da8be9 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -342,6 +342,16 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
pthread_mutex_lock(&keyInfo_mutex);
assert(XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, keyInfo.modMap,
QuartzBell, DarwinChangeKeyboardControl));
+ assert(pDev->key->xkbInfo->desc->map->modmap!=NULL);
+ memcpy(pDev->key->xkbInfo->desc->map->modmap, keyInfo.modMap, sizeof(keyInfo.modMap));
+ pthread_mutex_unlock(&keyInfo_mutex);
+
+ QuartzXkbUpdate(pDev);
+#else
+ pthread_mutex_lock(&keyInfo_mutex);
+ assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms,
+ QuartzBell,
+ DarwinChangeKeyboardControl ));
pthread_mutex_unlock(&keyInfo_mutex);
/* Get our key repeat settings from GlobalPreferences */