]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bootstrap.cxx
Fix for the fix: check for a viewer.
[flightgear.git] / src / Main / bootstrap.cxx
index 2b5cb2b262c062372f233b5d23da6e075392028e..be6c595b584038734310cfd1829d2827e0f563cc 100644 (file)
@@ -64,7 +64,7 @@ using std::endl;
 #include "fg_os.hxx"
 
 #if defined(SG_MAC)
-#include <Carbon/Carbon.h> 
+    #include <GUI/CocoaHelpers.h> // for transformToForegroundApp
 #endif
 
 std::string homedir;
@@ -164,9 +164,7 @@ int main ( int argc, char **argv )
 #if defined(SG_MAC)
     // required so native messages boxes work prior to osgViewer init
     // (only needed when not running as a bundled app)
-    ProcessSerialNumber sn = { 0, kCurrentProcess };
-    TransformProcessType(&sn,kProcessTransformToForegroundApplication);
-    SetFrontProcess(&sn);
+    transformToForegroundApp();
 #endif
     
 #ifdef PTW32_STATIC_LIB