From 4a4848c92a5d5b197853760d168c648b4d00de38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Tue, 21 Feb 2012 20:32:49 +0100 Subject: [PATCH] macosx: stop the playback on when closing the main window only if there's a video inside (close #6144) --- modules/gui/macosx/MainWindow.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index d657770adc..a24bf57d2c 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 -- 2.39.2