]> git.tdb.fi Git - libs/gui.git/commitdiff
Call setActivationPolicy to make non-bundled programs work
authorMikko Rasa <tdb@tdb.fi>
Fri, 11 Oct 2013 13:47:35 +0000 (16:47 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 11 Oct 2013 13:54:25 +0000 (16:54 +0300)
source/graphics/cocoa/cocoadisplay.m

index 5b7b064b1969563bbac01977e8b12a8095e4c922..3445c176cad0911337030543c1e52ae30f441c36 100644 (file)
@@ -17,8 +17,9 @@ CocoaDisplay *create_display()
 {
        CocoaDisplay *display = (CocoaDisplay *)malloc(sizeof(CocoaDisplay));
        display->app = [NSApplication sharedApplication];
-       // Since OS X 10.6
-       //[display->app setActivationPolicy:NSApplicationActivationPolicyRegular];
+       // This makes windows appear when run from terminal
+       if([display->app respondsToSelector:@selector(setActivationPolicy:)])
+               [display->app setActivationPolicy:NSApplicationActivationPolicyRegular];
        [display->app finishLaunching];
 
        CFArrayCallBacks callbacks;