]> git.saurik.com Git - wxWidgets.git/commitdiff
using systemui for full screen to allow modal dialogs
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 25 May 2011 11:26:47 +0000 (11:26 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 25 May 2011 11:26:47 +0000 (11:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm

index d7f79609fb39cc59eb3c197c4954775f1bb41fae..b618ff5938a474dc805aaa8c2d53d71b4a6aba1d 100644 (file)
@@ -873,8 +873,10 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style))
         m_macFullScreenData = data ;
         data->m_formerLevel = [m_macWindow level];
         data->m_formerFrame = [m_macWindow frame];
-        CGDisplayCapture( kCGDirectMainDisplay );
-        [m_macWindow setLevel:CGShieldingWindowLevel()];
+#if 0
+        // CGDisplayCapture( kCGDirectMainDisplay );
+        //[m_macWindow setLevel:NSMainMenuWindowLevel+1/*CGShieldingWindowLevel()*/];
+#endif
         NSRect screenframe = [[NSScreen mainScreen] frame];
         NSRect frame = NSMakeRect (0, 0, 100, 100);
         NSRect contentRect;
@@ -883,15 +885,25 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style))
         screenframe.origin.y += (frame.origin.y - contentRect.origin.y);
         screenframe.size.height += (frame.size.height - contentRect.size.height);
         [m_macWindow setFrame:screenframe display:YES];
+
+        OSStatus error = SetSystemUIMode(kUIModeAllHidden,
+                                kUIOptionDisableAppleMenu
+                                | kUIOptionDisableProcessSwitch
+                                | kUIOptionDisableForceQuit); 
     }
     else if ( m_macFullScreenData != NULL )
     {
         FullScreenData *data = (FullScreenData *) m_macFullScreenData ;
-        CGDisplayRelease( kCGDirectMainDisplay );
-        [m_macWindow setLevel:data->m_formerLevel];
+#if 0
+        // CGDisplayRelease( kCGDirectMainDisplay );
+        // [m_macWindow setLevel:data->m_formerLevel];
+#endif
+        
         [m_macWindow setFrame:data->m_formerFrame display:YES];
         delete data ;
         m_macFullScreenData = NULL ;
+
+        OSStatus error = SetSystemUIMode(kUIModeNormal, 0); 
     }
 
     return true;