[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:32:57 CET 2012
    
    
  
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Feb 21 20:32:49 2012 +0100| [4a4848c92a5d5b197853760d168c648b4d00de38] | committer: Felix Paul Kühne
macosx: stop the playback on when closing the main window only if there's a video inside (close #6144)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a4848c92a5d5b197853760d168c648b4d00de38
---
 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 d657770..a24bf57 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