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
|
@ -294,7 +294,15 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
|||
_appFlags._active = 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);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue