Commit 11b25c5b authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: use an updated API to set the behavior of menu bar and Dock in...

macosx: use an updated API to set the behavior of menu bar and Dock in fullscreen mode on 10.6&later

this allows the user to access the Dock while in fullscreen mode in contrast to the previous implementation. behavior on 10.5 did not change.
parent df0315ff
......@@ -972,7 +972,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
if ([screen isMainScreen])
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
{
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
}
[[o_video_view superview] replaceSubview:o_video_view with:o_temp_view];
[o_temp_view setFrame:[o_video_view frame]];
......@@ -1026,7 +1031,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
if ([screen isMainScreen])
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
{
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
}
dict1 = [[NSMutableDictionary alloc] initWithCapacity:2];
dict2 = [[NSMutableDictionary alloc] initWithCapacity:3];
......@@ -1131,7 +1141,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
[o_fspanel setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
/* Will release the lock */
[self hasEndedFullscreen];
......@@ -1154,7 +1167,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_video_view window] orderFront: self];
[o_fspanel setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
if (o_fullscreen_anim1)
{
......
......@@ -27,6 +27,9 @@
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSWindowDelegate <NSObject> @end
NSUInteger NSApplicationPresentationAutoHideDock;
NSUInteger NSApplicationPresentationAutoHideMenuBar;
NSUInteger NSApplicationPresentationDefault;
#endif
/*****************************************************************************
......
......@@ -144,7 +144,15 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindow release];
if( [screen isMainScreen ] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
{
if ([screen isMainScreen])
{
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
}
}
}
}
......@@ -158,7 +166,10 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindow closeAndAnimate: YES];
}
SetSystemUIMode( kUIModeNormal, 0);
if (NSAppKitVersionNumber < 1038) // Leopard
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
}
@end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment