Revert "macOS: Set correct fullscreen window level"
authorMarvin Scholz <epirat07@gmail.com>
Mon, 12 Jun 2017 20:56:05 +0000 (22:56 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Tue, 13 Jun 2017 21:27:27 +0000 (23:27 +0200)
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.

modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/Windows.m

index a0aaa18..eaf17ab 100644 (file)
@@ -597,7 +597,6 @@ void WindowClose(vout_window_t *p_wnd)
     [[main bookmarks] updateCocoaWindowLevel:currentStatusWindowLevel];
     [[main trackSyncPanel] updateCocoaWindowLevel:currentStatusWindowLevel];
     [[main resumeDialog] updateCocoaWindowLevel:currentStatusWindowLevel];
     [[main bookmarks] updateCocoaWindowLevel:currentStatusWindowLevel];
     [[main trackSyncPanel] updateCocoaWindowLevel:currentStatusWindowLevel];
     [[main resumeDialog] updateCocoaWindowLevel:currentStatusWindowLevel];
-    [[[[[VLCMain sharedInstance] mainWindow] fspanel] window] setLevel:currentStatusWindowLevel];
 }
 
 @end
 }
 
 @end
index 98da2ba..bb2e80e 100644 (file)
 
     NSInteger i_currLevel = [self level];
     // self.fullscreen and _inFullscreenTransition must not be true yet
 
     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;
     i_originalLevel = i_currLevel;
 
     _inFullscreenTransition = YES;
     /* 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
     /* 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 */
     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 */
         [o_fullscreen_window setCanBecomeMainWindow: YES];
         [o_fullscreen_window setHasActiveVideo: YES];
         [o_fullscreen_window setFullscreen: YES];
         [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];
 
         /* Make sure video view gets visible in case the playlist was visible before */
         b_video_view_was_hidden = [_videoView isHidden];
 
             [o_fullscreen_window orderFront:self animate:YES];
 
 
             [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);
             if (blackout_other_displays) {
                 CGDisplayFade(token, 0.3, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, NO);
                 CGReleaseDisplayFadeReservation(token);