]> git.sesse.net Git - vlc/commitdiff
macosx: fix float-on-top in combination with fullscreen
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Tue, 17 Feb 2015 19:10:12 +0000 (20:10 +0100)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Tue, 17 Feb 2015 19:11:20 +0000 (20:11 +0100)
modules/gui/macosx/Windows.m

index 48b1d82f6ebe73a4c76b231cd8ee8ceb07a75b11..331da6158e814dd141d4403357b7d5ef340d594b 100644 (file)
 
 - (void)windowWillEnterFullScreen:(NSNotification *)notification
 {
-    i_originalLevel = [self level];
     b_windowShouldExitFullscreenWhenFinished = [[VLCMain sharedInstance] activeVideoPlayback];
 
+    NSInteger i_currLevel = [self level];
     // b_fullscreen and b_in_fullscreen_transition must not be true yet
     [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
     [self setLevel:NSNormalWindowLevel];
+    i_originalLevel = i_currLevel;
 
     b_in_fullscreen_transition = YES;
 
         [screen blackoutOtherScreens];
 
     /* Make sure we don't see the window flashes in float-on-top mode */
-    i_originalLevel = [self level];
+    NSInteger i_currLevel = [self level];
     // b_fullscreen must not be true yet
     [[[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 */
     if (!o_fullscreen_window) {