Skip to content

Commit

Permalink
[cosmetic] - nothing to see here
Browse files Browse the repository at this point in the history
  • Loading branch information
Memphiz committed May 12, 2012
1 parent 637d3ea commit e790858
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions xbmc/windowing/osx/WinSystemOSX.mm
Expand Up @@ -210,17 +210,19 @@ float GetDictionaryFloat(CFDictionaryRef theDict, const void* key)
}

//---------------------------------------------------------------------------------
void HideMenuBar()
void SetMenuBarVisible(bool visible)
{
[[NSApplication sharedApplication]
setPresentationOptions: NSApplicationPresentationHideMenuBar |
NSApplicationPresentationHideDock];
}
//---------------------------------------------------------------------------------
void ShowMenuBar()
{
[[NSApplication sharedApplication]
setPresentationOptions: NSApplicationPresentationDefault];
if(visible)
{
[[NSApplication sharedApplication]
setPresentationOptions: NSApplicationPresentationDefault];
}
else
{
[[NSApplication sharedApplication]
setPresentationOptions: NSApplicationPresentationHideMenuBar |
NSApplicationPresentationHideDock];
}
}
//---------------------------------------------------------------------------------
CGDirectDisplayID GetDisplayID(int screen_index)
Expand Down Expand Up @@ -791,7 +793,7 @@ static void DisplayReconfigured(CGDirectDisplayID display,

// Hide the menu bar.
if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay)
HideMenuBar();
SetMenuBarVisible(false);

// Blank other displays if requested.
if (blankOtherDisplays)
Expand Down Expand Up @@ -825,7 +827,7 @@ static void DisplayReconfigured(CGDirectDisplayID display,

// If we don't hide menu bar, it will get events and interrupt the program.
if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay)
HideMenuBar();
SetMenuBarVisible(false);
}

// Hide the mouse.
Expand Down Expand Up @@ -853,7 +855,7 @@ static void DisplayReconfigured(CGDirectDisplayID display,

// Show menubar.
if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay)
ShowMenuBar();
SetMenuBarVisible(true);

if (g_guiSettings.GetBool("videoscreen.fakefullscreen"))
{
Expand Down Expand Up @@ -1240,7 +1242,7 @@ static void DisplayReconfigured(CGDirectDisplayID display,
NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"];
if ((CGDirectDisplayID)[screenID longValue] == kCGDirectMainDisplay)
{
HideMenuBar();
SetMenuBarVisible(false);
}
[window orderFront:nil];
}
Expand Down

0 comments on commit e790858

Please sign in to comment.