[vlc-devel] [PATCH] Revert "macOS: Set correct fullscreen window level"
Marvin Scholz
epirat07 at gmail.com
Mon Jun 12 23:01:01 CEST 2017
This reverts commit 6aa13aa2e52633e453ddae2e6c09a3c3c4d94e0a.
It was intended to fix #18117 (Menubar visible in fullscreen)
but broke different things and additonally changed behaviour
in ways that might be confusing for some users.
Fix #18328
---
This should be re-applied at some point, or a better solution found
but imho for now it is best to revert this, to fix the bugs this
caused, as they are worse than the edge-case this commit fixed.
modules/gui/macosx/VLCVoutWindowController.m | 1 -
modules/gui/macosx/Windows.m | 11 ++++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index a0aaa18b3f..eaf17abf7f 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -597,7 +597,6 @@ - (void)updateWindowLevelForHelperWindows:(NSInteger)i_level
[[main bookmarks] updateCocoaWindowLevel:currentStatusWindowLevel];
[[main trackSyncPanel] updateCocoaWindowLevel:currentStatusWindowLevel];
[[main resumeDialog] updateCocoaWindowLevel:currentStatusWindowLevel];
- [[[[[VLCMain sharedInstance] mainWindow] fspanel] window] setLevel:currentStatusWindowLevel];
}
@end
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 4a037168b0..1e4e982371 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -661,8 +661,8 @@ - (void)windowWillEnterFullScreen:(NSNotification *)notification
NSInteger i_currLevel = [self level];
// self.fullscreen and _inFullscreenTransition must not be true yet
- [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSMainMenuWindowLevel + 1];
- [self setLevel:NSMainMenuWindowLevel + 1];
+ [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
+ [self setLevel:NSNormalWindowLevel];
i_originalLevel = i_currLevel;
_inFullscreenTransition = YES;
@@ -815,8 +815,8 @@ - (void)enterFullscreenWithAnimation:(BOOL)b_animation
/* Make sure we don't see the window flashes in float-on-top mode */
NSInteger i_currLevel = [self level];
// self.fullscreen must not be true yet
- [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSMainMenuWindowLevel + 1];
- [self setLevel:NSMainMenuWindowLevel + 1];
+ [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
+ [self setLevel:NSNormalWindowLevel];
i_originalLevel = i_currLevel; // would be overwritten by previous call
/* Only create the o_fullscreen_window if we are not in the middle of the zooming animation */
@@ -832,7 +832,6 @@ - (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];
@@ -863,6 +862,8 @@ - (void)enterFullscreenWithAnimation:(BOOL)b_animation
[o_fullscreen_window orderFront:self animate:YES];
+ [o_fullscreen_window setLevel:NSNormalWindowLevel];
+
if (blackout_other_displays) {
CGDisplayFade(token, 0.3, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, NO);
CGReleaseDisplayFadeReservation(token);
--
2.11.0 (Apple Git-81)
More information about the vlc-devel
mailing list