[vlc-devel] [PATCH] macOS: Set correct fullscreen window level
Andreas Mieke
andreas at 1750studios.com
Wed Apr 19 21:43:10 CEST 2017
Setting the correct fullscreen window level to hide menu bar
when other apps are active, according to
https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_fullscreen/opengl_cgl.html
Fix #18117
---
modules/gui/macosx/VLCFSPanelController.m | 2 ++
modules/gui/macosx/Windows.m | 2 ++
2 files changed, 4 insertions(+)
diff --git a/modules/gui/macosx/VLCFSPanelController.m b/modules/gui/macosx/VLCFSPanelController.m
index e3ed64f..8a17290 100644
--- a/modules/gui/macosx/VLCFSPanelController.m
+++ b/modules/gui/macosx/VLCFSPanelController.m
@@ -357,11 +357,13 @@ - (NSRect)contrainFrameToAssociatedVoutWindow:(NSRect)frame
- (void)setNonActive
{
[self.window orderOut:self];
+ [self.window setLevel:NSMainMenuWindowLevel];
}
- (void)setActive
{
[self.window orderFront:self];
+ [self.window setLevel:NSMainMenuWindowLevel + 2];
[self fadeIn];
}
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 4b34e64..418008d 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -829,6 +829,7 @@ - (void)enterFullscreenWithAnimation:(BOOL)b_animation
[o_fullscreen_window setCanBecomeMainWindow: YES];
[o_fullscreen_window setHasActiveVideo: YES];
[o_fullscreen_window setFullscreen: YES];
+ [o_fullscreen_window setLevel: NSMainMenuWindowLevel + 1];
/* Make sure video view gets visible in case the playlist was visible before */
b_video_view_was_hidden = [_videoView isHidden];
@@ -971,6 +972,7 @@ - (void)leaveFullscreenWithAnimation:(BOOL)b_animation
[[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
[[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
+ [o_fullscreen_window setLevel: NSMainMenuWindowLevel];
if (o_fullscreen_anim1) {
[o_fullscreen_anim1 stopAnimation];
--
2.10.1 (Apple Git-78)
More information about the vlc-devel
mailing list