[vlc-commits] macosx: fix float-on-top in combination with fullscreen

David Fuhrmann git at videolan.org
Tue Feb 17 20:10:37 CET 2015


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue Feb 17 20:10:12 2015 +0100| [c7573b41a112df48b248139fb7318f94413dba3a] | committer: David Fuhrmann

macosx: fix float-on-top in combination with fullscreen

(cherry picked from commit c63f722df235e9c2b154a702dcab081f7e4f0339)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=c7573b41a112df48b248139fb7318f94413dba3a
---

 modules/gui/macosx/Windows.m |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 48b1d82..331da61 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -720,12 +720,13 @@
 
 - (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;
 
@@ -877,10 +878,11 @@
         [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) {



More information about the vlc-commits mailing list