[vlc-commits] macosx: stop the playback on when closing the main window only if there' s a video inside (close #6144)
Felix Paul Kühne
git at videolan.org
Tue Feb 21 20:33:19 CET 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Feb 21 20:32:49 2012 +0100| [de703379762135cebcc7009812ff86f5f1584c1e] | committer: Felix Paul Kühne
macosx: stop the playback on when closing the main window only if there's a video inside (close #6144)
(cherry picked from commit 4a4848c92a5d5b197853760d168c648b4d00de38)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=de703379762135cebcc7009812ff86f5f1584c1e
---
modules/gui/macosx/MainWindow.m | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 4a02578..a1163a9 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -804,7 +804,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface)
{
[self orderOut: sender];
- [[VLCCoreInteraction sharedInstance] stop];
+ if ([[VLCMain sharedInstance] activeVideoPlayback] && !b_nonembedded)
+ [[VLCCoreInteraction sharedInstance] stop];
}
else
[super performClose: sender];
@@ -955,8 +956,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)someWindowWillClose:(NSNotification *)notification
{
- if([notification object] == o_nonembedded_window || [notification object] == self)
- [[VLCCoreInteraction sharedInstance] stop];
+ if([notification object] == o_nonembedded_window || ([notification object] == self && !b_nonembedded))
+ {
+ if ([[VLCMain sharedInstance] activeVideoPlayback])
+ [[VLCCoreInteraction sharedInstance] stop];
+ }
}
- (void)someWindowWillMiniaturize:(NSNotification *)notification
More information about the vlc-commits
mailing list