[Orxonox-commit 2961] r7660 - code/branches/ois_update/src/libraries/core
youngk at orxonox.net
youngk at orxonox.net
Wed Nov 24 14:39:15 CET 2010
Author: youngk
Date: 2010-11-24 14:39:14 +0100 (Wed, 24 Nov 2010)
New Revision: 7660
Modified:
code/branches/ois_update/src/libraries/core/GraphicsManager.cc
Log:
Added a hack to force the orxonox window to front on OS X.
Modified: code/branches/ois_update/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/GraphicsManager.cc 2010-11-24 13:34:29 UTC (rev 7659)
+++ code/branches/ois_update/src/libraries/core/GraphicsManager.cc 2010-11-24 13:39:14 UTC (rev 7660)
@@ -313,7 +313,16 @@
this->ogreWindowEventListener_->windowResized(renderWindow_);
Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
-
+
+// HACK
+#ifdef __APPLE_CC__
+ //INFO: This will give our window focus, and not lock it to the terminal
+ ProcessSerialNumber psn = {0, kCurrentProcess};
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ SetFrontProcess(&psn);
+#endif
+// End of HACK
+
// create a full screen default viewport
// Note: This may throw when adding a viewport with an existing z-order!
// But in our case we only have one viewport for now anyway, therefore
More information about the Orxonox-commit
mailing list