Commit 791354cd authored by David Fuhrmann's avatar David Fuhrmann

macosx: preserve fullscreen state also in native fullscreen mode

should close #10670
parent dd7b6ad8
...@@ -235,6 +235,12 @@ ...@@ -235,6 +235,12 @@
return; 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 // prevent visible extra window if in fullscreen
NSDisableScreenUpdates(); NSDisableScreenUpdates();
BOOL b_native = [[VLCMainWindow sharedInstance] nativeFullscreenMode]; BOOL b_native = [[VLCMainWindow sharedInstance] nativeFullscreenMode];
...@@ -249,12 +255,6 @@ ...@@ -249,12 +255,6 @@
[o_window toggleFullScreen:self]; [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]) { if ([o_window class] != [VLCMainWindow class]) {
[o_window close]; [o_window close];
} }
......
...@@ -786,9 +786,9 @@ ...@@ -786,9 +786,9 @@
b_in_fullscreen_transition = YES; b_in_fullscreen_transition = YES;
[self setFullscreen: NO]; [self setFullscreen: NO];
var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
if ([self hasActiveVideo]) { if ([self hasActiveVideo]) {
var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
vout_thread_t *p_vout = getVoutForActiveWindow(); vout_thread_t *p_vout = getVoutForActiveWindow();
if (p_vout) { if (p_vout) {
var_SetBool(p_vout, "fullscreen", false); var_SetBool(p_vout, "fullscreen", false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment