[vlc-commits] windowed mac plugin: make sure that menu bar and dock are hidden in fullscreen mode
Felix Paul Kühne
git at videolan.org
Wed Jan 16 14:23:00 CET 2013
npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jan 16 14:22:55 2013 +0100| [b06ffc0122e296de3e749826b063e013942bc0df] | committer: Felix Paul Kühne
windowed mac plugin: make sure that menu bar and dock are hidden in fullscreen mode
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=b06ffc0122e296de3e749826b063e013942bc0df
---
npapi/vlcplugin_mac.mm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
index 05d91c7..bb9c1a9 100644
--- a/npapi/vlcplugin_mac.mm
+++ b/npapi/vlcplugin_mac.mm
@@ -215,7 +215,7 @@ void VlcPluginMac::toggle_fullscreen()
if (get_fullscreen() == 0) {
if (!fullscreenWindow) {
fullscreenWindow = [[VLCFullscreenWindow alloc] initWithContentRect: NSMakeRect(npwindow.x, npwindow.y, npwindow.width, npwindow.height)];
- [fullscreenWindow setLevel: kCGFloatingWindowLevel];
+ [fullscreenWindow setLevel: CGShieldingWindowLevel()];
fullscreenView = [fullscreenWindow customContentView];
/* CAVE: the order of these methods is important, since we want a layer-hosting view instead of
@@ -237,6 +237,8 @@ void VlcPluginMac::toggle_fullscreen()
[fullscreenWindow makeKeyAndOrderFront:nil];
[fullscreenWindow enterFullscreen];
+ [fullscreenWindow orderFrontRegardless];
+ [fullscreenWindow makeKeyWindow];
} else {
[fullscreenWindow leaveFullscreen];
[fullscreenWindow orderOut: nil];
@@ -890,6 +892,7 @@ static CGImageRef createImageNamed(NSString *name)
NSApplicationPresentationOptions presentationOpts = [NSApp presentationOptions];
if ([screen hasMenuBar])
presentationOpts |= NSApplicationPresentationAutoHideMenuBar;
+
if ([screen hasMenuBar] || [screen hasDock])
presentationOpts |= NSApplicationPresentationAutoHideDock;
[NSApp setPresentationOptions:presentationOpts];
More information about the vlc-commits
mailing list