[vlc-commits] macosx: pause playback on window minimization only if there is an active video output (fixes #5882)

Felix Paul Kühne git at videolan.org
Sat Jan 21 22:21:00 CET 2012


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan 20 10:32:58 2012 -0800| [651932c592cba1b0ce86c059a5e4e0a9207c3d79] | committer: Jean-Baptiste Kempf

macosx: pause playback on window minimization only if there is an active video output (fixes #5882)
(cherry picked from commit 1fb57312dde28b3e8d1bb966418229898d1fdfa5)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=651932c592cba1b0ce86c059a5e4e0a9207c3d79
---

 modules/gui/macosx/MainWindow.m |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 827b78a..3041196 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -767,7 +767,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if (b_dark_interface)
     {
         [self miniaturize: sender];
-        [[VLCCoreInteraction sharedInstance] pause];
+        if ([[VLCMain sharedInstance] activeVideoPlayback])
+            [[VLCCoreInteraction sharedInstance] pause];
     }
     else
         [super performMiniaturize: sender];
@@ -1272,7 +1273,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (void)someWindowWillMiniaturize:(NSNotification *)notification
 {
     if([notification object] == o_nonembedded_window || [notification object] == self)
-        [[VLCCoreInteraction sharedInstance] pause];
+    {
+        if([[VLCMain sharedInstance] activeVideoPlayback])
+            [[VLCCoreInteraction sharedInstance] pause];
+    }
 }
 
 #pragma mark -



More information about the vlc-commits mailing list