summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2010-01-11 18:02:55 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2010-01-20 16:51:46 -0800
commit268c00d24b1938aaa75ad23892fba6ef241fbe9d (patch)
treecc3a0112f5d419189cf8d7c48c4579d412c72249
parentb852834bb1974a2c149869b6e19aff000a2b4187 (diff)
XQuartz: Setup the modifier map in the quartz thread
This avoids possible doing it twice which could result in incorrect keycodes for alt due to our loss of information about its side. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> (cherry picked from commit 6008cc116493cb2825ad0bda0b407b7aefabb3f4)
-rw-r--r--hw/xquartz/quartzKeyboard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 62b2ebbdf..96b5fa5b6 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -260,6 +260,7 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
break;
case XK_Mode_switch:
+ ErrorF("DarwinBuildModifierMaps: XK_Mode_switch encountered, unable to determine side.\n");
info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
#ifdef NX_MODIFIERKEY_RALTERNATE
info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i;
@@ -388,7 +389,6 @@ void DarwinKeyboardReloadHandler(void) {
pthread_mutex_lock(&keyInfo_mutex); {
/* Initialize our keySyms */
- DarwinBuildModifierMaps(&keyInfo);
keySyms.map = keyInfo.keyMap;
keySyms.mapWidth = GLYPHS_PER_KEY;
keySyms.minKeyCode = MIN_KEYCODE;
@@ -808,5 +808,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
}
}
+ DarwinBuildModifierMaps(info);
+
return TRUE;
}