mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-07 23:02:23 +00:00
XQuartz: Honor the Spaces preference for "When switching to an application, switch to a space with open windows for the application"
(cherry picked from commit bf561a06b2bf60395d26026ac7627d0cb254bc07)
This commit is contained in:
parent
75067d12e4
commit
3e999d35c2
1 changed files with 9 additions and 1 deletions
|
|
@ -294,7 +294,15 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
_appFlags._active = YES;
|
_appFlags._active = YES;
|
||||||
|
|
||||||
[self activateX:YES];
|
[self activateX:YES];
|
||||||
if ([e data2] & 0x10)
|
|
||||||
|
/* Get the Spaces preference for SwitchOnActivate */
|
||||||
|
(void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
|
||||||
|
BOOL switch_on_activate, ok;
|
||||||
|
switch_on_activate = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok);
|
||||||
|
if(!ok)
|
||||||
|
switch_on_activate = YES;
|
||||||
|
|
||||||
|
if ([e data2] & 0x10 && switch_on_activate)
|
||||||
DarwinSendDDXEvent(kXquartzBringAllToFront, 0);
|
DarwinSendDDXEvent(kXquartzBringAllToFront, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue