diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 86da67f2e..ea9a6b758 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -98,6 +98,8 @@ extern int quartzHasRoot, quartzEnableRootless;
#define PREFS_XP_OPTIONS "xp_options"
#define PREFS_ENABLE_STEREO "enable_stereo"
#define PREFS_LOGIN_SHELL "login_shell"
-#define PREFS_QUARTZ_WM_CLICK_THROUGH "wm_click_through"
+#define PREFS_CLICK_THROUGH "wm_click_through"
+#define PREFS_FFM "wm_ffm"
+#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window"
#endif /* X11APPLICATION_H */
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 64d5cd1ce..8d6a38ff0 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -45,6 +45,8 @@
IBOutlet NSButton *enable_keyequivs;
IBOutlet NSButton *sync_keymap;
IBOutlet NSButton *click_through;
+ IBOutlet NSButton *focus_follows_mouse;
+ IBOutlet NSButton *focus_on_new_window;
IBOutlet NSButton *enable_auth;
IBOutlet NSButton *enable_tcp;
IBOutlet NSPopUpButton *depth;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 5111eafc3..3880b3f38 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -609,24 +609,28 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
- (IBAction)prefs_changed:sender
{
- darwinFakeButtons = [fake_buttons intValue];
- quartzUseSysBeep = [use_sysbeep intValue];
- X11EnableKeyEquivalents = [enable_keyequivs intValue];
- darwinSyncKeymap = [sync_keymap intValue];
-
- /* after adding prefs here, also add to [X11Application read_defaults]
+ darwinFakeButtons = [fake_buttons intValue];
+ quartzUseSysBeep = [use_sysbeep intValue];
+ X11EnableKeyEquivalents = [enable_keyequivs intValue];
+ darwinSyncKeymap = [sync_keymap intValue];
+
+ /* after adding prefs here, also add to [X11Application read_defaults]
and below */
- [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
- [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
- [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
- [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
- [NSApp prefs_set_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH value:[click_through intValue]];
- [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
- [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
- [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
+ [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
+ [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
+ [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
+ [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
+ [NSApp prefs_set_boolean:@PREFS_CLICK_THROUGH value:[click_through intValue]];
+ [NSApp prefs_set_boolean:@PREFS_FFM value:[focus_follows_mouse intValue]];
+ [NSApp prefs_set_boolean:@PREFS_FOCUS_ON_NEW_WINDOW value:[focus_on_new_window intValue]];
+ [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
+ [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
+ [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
+
+ system("killall -HUP quartz-wm");
- [NSApp prefs_synchronize];
+ [NSApp prefs_synchronize];
}
- (IBAction) prefs_show:sender
@@ -636,8 +640,10 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
[enable_keyequivs setIntValue:X11EnableKeyEquivalents];
[sync_keymap setIntValue:darwinSyncKeymap];
[sync_keymap setEnabled:darwinKeymapFile == NULL];
- [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH default:NO]];
-
+ [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]];
+ [focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]];
+ [focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]];
+
[enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
[enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
[depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index ea3a0daa8..adc0340ed 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -8,8 +8,6 @@
352.00