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 !
isTheProcessSetAsApplication = true;
// Set the process as a normal application so it can get focus.
ProcessSerialNumber psn;
if (!GetCurrentProcess(&psn))
{
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
SetFrontProcess(&psn);
}
// Make sure NSApp is properly initialized
[SFApplication sharedApplication];
// Set the process as a normal application so it can get focus
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps:YES];
// Register an application delegate if there is none
if (![[SFApplication sharedApplication] delegate])