From: Mikko Rasa Date: Fri, 11 Oct 2013 13:47:35 +0000 (+0300) Subject: Call setActivationPolicy to make non-bundled programs work X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=88c49198486808f1b53f4417c387feb478e9b1c7;p=libs%2Fgui.git Call setActivationPolicy to make non-bundled programs work --- diff --git a/source/graphics/cocoa/cocoadisplay.m b/source/graphics/cocoa/cocoadisplay.m index 5b7b064..3445c17 100644 --- a/source/graphics/cocoa/cocoadisplay.m +++ b/source/graphics/cocoa/cocoadisplay.m @@ -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;