[vlc-commits] macosx: fix behaviour when changing video splitters on the fly
David Fuhrmann
git at videolan.org
Wed Feb 13 17:50:26 CET 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Feb 13 17:49:00 2013 +0100| [093ffb06d60e7f3ba9ae590844975f6c8086e8ba] | committer: David Fuhrmann
macosx: fix behaviour when changing video splitters on the fly
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=093ffb06d60e7f3ba9ae590844975f6c8086e8ba
---
modules/gui/macosx/MainWindow.m | 3 ++-
modules/gui/macosx/VLCVoutWindowController.m | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 57bc84d..2318d12 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -530,7 +530,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
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])
[[VLCCoreInteraction sharedInstance] stop];
}
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index 2677f7b..c5005d4 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -202,11 +202,13 @@
[o_window leaveFullscreen];
[[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"]) {
[o_window close];
- [o_window orderOut:self];
+ [o_window orderOut:self]; // for dark interface
}
[o_vout_dict removeObjectForKey:o_key];
More information about the vlc-commits
mailing list