Replaced deprecated functions on OS X 10.9

This commit is contained in:
Marco Antognini 2014-05-17 13:27:18 +02:00
parent b9f5f19f7c
commit e33e061e96

View File

@ -207,13 +207,12 @@ void WindowImplCocoa::setUpProcess(void)
// Do it only once ! // Do it only once !
isTheProcessSetAsApplication = true; isTheProcessSetAsApplication = true;
// Set the process as a normal application so it can get focus. // Make sure NSApp is properly initialized
ProcessSerialNumber psn; [SFApplication sharedApplication];
if (!GetCurrentProcess(&psn))
{ // Set the process as a normal application so it can get focus
TransformProcessType(&psn, kProcessTransformToForegroundApplication); [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
SetFrontProcess(&psn); [NSApp activateIgnoringOtherApps:YES];
}
// Register an application delegate if there is none // Register an application delegate if there is none
if (![[SFApplication sharedApplication] delegate]) if (![[SFApplication sharedApplication] delegate])