[vlc-commits] macosx: preserve fullscreen state also in native fullscreen mode

David Fuhrmann git at videolan.org
Mon Mar 31 20:29:41 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Mar 31 19:26:05 2014 +0200| [791354cd285bd52fb556a6e844a4f841ef27561f] | committer: David Fuhrmann

macosx: preserve fullscreen state also in native fullscreen mode

should close #10670

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

 modules/gui/macosx/VLCVoutWindowController.m |   12 ++++++------
 modules/gui/macosx/Windows.m                 |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index 828e42c..584d3c2 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -235,6 +235,12 @@
         return;
     }
 
+    [[o_window videoView] releaseVoutThread];
+
+    // set active video to no BEFORE closing the window and exiting fullscreen
+    // (avoid stopping playback due to NSWindowWillCloseNotification, preserving fullscreen state)
+    [o_window setHasActiveVideo: NO];
+
     // prevent visible extra window if in fullscreen
     NSDisableScreenUpdates();
     BOOL b_native = [[VLCMainWindow sharedInstance] nativeFullscreenMode];
@@ -249,12 +255,6 @@
         [o_window toggleFullScreen:self];
     }
 
-    [[o_window videoView] releaseVoutThread];
-
-    // set active video to no BEFORE closing the window to avoid stopping playback
-    // due to NSWindowWillCloseNotification
-    [o_window setHasActiveVideo: NO];
-
     if ([o_window class] != [VLCMainWindow class]) {
         [o_window close];
     }
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 4ddf544..9ef3810 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -786,9 +786,9 @@
     b_in_fullscreen_transition = YES;
     [self setFullscreen: NO];
 
-    var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
-
     if ([self hasActiveVideo]) {
+        var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
+
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
             var_SetBool(p_vout, "fullscreen", false);



More information about the vlc-commits mailing list