Resolved Mac app bundle startup issues.

This commit is contained in:
Pietro Gagliardi 2014-08-05 08:23:16 -04:00
parent b46167f1e2
commit c1055ae278
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ BOOL uiinit(void)
{
appDelegate = [appDelegateClass new];
[NSApplication sharedApplication];
// don't check for a NO return; something (launch services?) causes running from application bundles to always return NO when asking to change activation policy, even if the change is to the same activation policy!
// see https://github.com/andlabs/ui/issues/6
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps:YES]; // TODO rsc does this; finder says NO?
[NSApp setDelegate:appDelegate];