Commit 368b43c8 authored by mercury233's avatar mercury233 Committed by GitHub

set activation policy to Regular in macOS (#25)

This ensures the application appears in the Dock and has a menu bar.
This was the default behavior, but recent updates of Xcode seem to have changed that.
parent 4239a3d3
...@@ -494,6 +494,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) ...@@ -494,6 +494,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
if(!CreationParams.WindowId) //load menus if standalone application if(!CreationParams.WindowId) //load menus if standalone application
{ {
[[NSAutoreleasePool alloc] init]; [[NSAutoreleasePool alloc] init];
[[NSApplication sharedApplication] setActivationPolicy:NSApplicationActivationPolicyRegular];
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
[NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]]; [NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]]; [NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment