summaryrefslogtreecommitdiff
path: root/hw/xquartz/X11Application.m
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-04-09 13:29:34 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-04-11 16:30:19 -0700
commit840d12c7a6ac6a974da185045215ce944a61fab6 (patch)
treee00de3cbacc16a8355805262b60bd53b32c967c6 /hw/xquartz/X11Application.m
parentd6f160510a50d4c4eaa48c9c69a5ddda0d50052c (diff)
XQuartz: Add a defaults option to toggle Alt / Mode_switch
See option_sends_alt in Xquartz(1) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com>
Diffstat (limited to 'hw/xquartz/X11Application.m')
-rw-r--r--hw/xquartz/X11Application.m19
1 files changed, 7 insertions, 12 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 54066404e..c9a0d669f 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -712,10 +712,13 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
default:quartzEnableRootless];
quartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU
default:quartzFullscreenMenu];
- quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
- @PREFS_FULLSCREEN_HOTKEYS default:!quartzFullscreenDisableHotkeys];
+ quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS
+ default:!quartzFullscreenDisableHotkeys];
darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
default:darwinFakeButtons];
+ quartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT
+ default:quartzOptionSendsAlt];
+
if (darwinFakeButtons) {
const char *fake2, *fake3;
@@ -969,8 +972,7 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
fprintf(stderr, "X11ApplicationMain: Unable to determine KLGetCurrentKeyboardLayout() at startup.\n");
#endif
- memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap));
- if (!QuartzReadSystemKeymap(&keyInfo)) {
+ if (!QuartsResyncKeymap(FALSE)) {
fprintf(stderr, "X11ApplicationMain: Could not build a valid keymap.\n");
}
@@ -1229,17 +1231,10 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
if(key_layout != last_key_layout) {
last_key_layout = key_layout;
#endif
-
/* Update keyInfo */
- pthread_mutex_lock(&keyInfo_mutex);
- memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap));
- if (!QuartzReadSystemKeymap(&keyInfo)) {
+ if (!QuartsResyncKeymap(TRUE)) {
fprintf(stderr, "sendX11NSEvent: Could not build a valid keymap.\n");
}
- pthread_mutex_unlock(&keyInfo_mutex);
-
- /* Tell server thread to deal with new keyInfo */
- DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
}
}