[vlc-devel] [PATCH] macOS: Set correct fullscreen window level
David Fuhrmann
david.fuhrmann at gmail.com
Fri Apr 28 18:58:01 CEST 2017
> Am 19.04.2017 um 21:43 schrieb Andreas Mieke <andreas at 1750studios.com>:
>
> 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];
Hi Andreas,
Did you check all the information panels and menus? They should still work in fullscreen mode, so I doubt this line will be enough.
>
> /* 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];
Why not resetting back to normal window level? How does your change behave if video-on-top was enabled before?
BR. David
More information about the vlc-devel
mailing list