Commit 093ffb06 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix behaviour when changing video splitters on the fly

parent 303f6938
...@@ -530,7 +530,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -530,7 +530,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
{ {
id obj = [notification object]; id obj = [notification object];
if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !b_nonembedded)) { // hasActiveVideo is defined for VLCVideoWindowCommon and subclasses
if ([obj respondsToSelector:@selector(hasActiveVideo)] && [obj hasActiveVideo]) {
if ([[VLCMain sharedInstance] activeVideoPlayback]) if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] stop]; [[VLCCoreInteraction sharedInstance] stop];
} }
......
...@@ -202,11 +202,13 @@ ...@@ -202,11 +202,13 @@
[o_window leaveFullscreen]; [o_window leaveFullscreen];
[[o_window videoView] releaseVoutThread]; [[o_window videoView] releaseVoutThread];
[o_window setHasActiveVideo: NO];
// set active video to no BEFORE closing the window to avoid stopping playback
// due to NSWindowWillCloseNotification
[o_window setHasActiveVideo: NO];
if (![NSStringFromClass([o_window class]) isEqualToString:@"VLCMainWindow"]) { if (![NSStringFromClass([o_window class]) isEqualToString:@"VLCMainWindow"]) {
[o_window close]; [o_window close];
[o_window orderOut:self]; [o_window orderOut:self]; // for dark interface
} }
[o_vout_dict removeObjectForKey:o_key]; [o_vout_dict removeObjectForKey:o_key];
......
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