[osx] - since the osx windowing refactoring and sdk 10.6 bump we don't need to diddle...
authorMemphiz <memphis@machzwo.de>
Sun, 25 Nov 2012 13:27:16 +0000 (14:27 +0100)
committerMemphiz <memphis@machzwo.de>
Sun, 25 Nov 2012 13:27:16 +0000 (14:27 +0100)
xbmc/osx/CocoaInterface.mm
xbmc/powermanagement/osx/CocoaPowerSyscall.cpp

index 9a6bb9b..f06333e 100644 (file)
@@ -372,36 +372,19 @@ void Cocoa_ShowMouse()
   [NSCursor unhide];
 }
 
-void Cocoa_HideDock()
+//---------------------------------------------------------------------------------
+void SetMenuBarVisible2(bool visible)
 {
-  // Find which display we are on
-  NSOpenGLContext* context = [NSOpenGLContext currentContext];
-  if (context)
+  if(visible)
   {
-    NSView* view;
-
-    view = [context view];
-    if (view)
-    {
-      NSWindow* window;
-      window = [view window];
-      if (window)
-      {
-        NSDictionary* screenInfo = [[window screen] deviceDescription];
-        NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"];
-        if (kCGDirectMainDisplay == (CGDirectDisplayID)[screenID longValue])
-        {
-          CStdString tmp_str;
-
-          // keep the dock hidden using applescriptif on main screen with the dock.
-          tmp_str = "tell application \"System Events\" \n";
-          tmp_str += "keystroke \"d\" using {command down, option down} \n";
-          tmp_str += "end tell \n";
-          
-          Cocoa_DoAppleScript( tmp_str.c_str() );
-        }
-      }
-    }
+    [[NSApplication sharedApplication]
+      setPresentationOptions:   NSApplicationPresentationDefault];
+  }
+  else
+  {
+    [[NSApplication sharedApplication]
+      setPresentationOptions:   NSApplicationPresentationHideMenuBar |
+                                NSApplicationPresentationHideDock];
   }
 }
 
index fc99bd7..2cea944 100644 (file)
@@ -239,10 +239,6 @@ bool CCocoaPowerSyscall::PumpPowerEvents(IPowerEventsCallback *callback)
   else if (m_OnResume)
   {
     callback->OnWake();
-#if !defined(TARGET_DARWIN_IOS)
-    if (g_Windowing.IsFullScreen())
-      Cocoa_HideDock();
-#endif
     m_OnResume = false;
   }