]> git.sesse.net Git - vlc/commitdiff
macosx: stop the playback on when closing the main window only if there's a video...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 21 Feb 2012 19:32:49 +0000 (20:32 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 21 Feb 2012 19:32:49 +0000 (20:32 +0100)
modules/gui/macosx/MainWindow.m

index d657770adcfb3ce5eb422b1a505254c18ad5363b..a24bf57d2cb2bb392534045ab5bf26c36472c862 100644 (file)
@@ -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