Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[osx] - since the osx windowing refactoring and sdk 10.6 bump we don'…

…t need to diddle with hiding the dock on resume anymore. The applescript approach had a flaw which just toggled the autohide option systemwide - which would overwrite usersettings. Just get rid of that cocoa stuff for autodock hiding and let the osx windowing do its magic.
  • Loading branch information...
commit 687abf2d7f169b8c5846f325e813603ff04570ac 1 parent 2896704
Memphiz Memphiz authored
39 xbmc/osx/CocoaInterface.mm
View
@@ -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];
}
}
4 xbmc/powermanagement/osx/CocoaPowerSyscall.cpp
View
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.