[vlc-commits] macosx: make sure that playbacks stops when closing the main window ( fixes #5858)

Felix Paul Kühne git at videolan.org
Sun Jan 15 20:13:37 CET 2012


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jan 15 20:08:45 2012 +0100| [54d688185088becc70c8d1e86152a09c8f6c3497] | committer: Jean-Baptiste Kempf

macosx: make sure that playbacks stops when closing the main window (fixes #5858)
(cherry picked from commit ad4ff46f2b04d96eb4b4dfab5a39d6d1dc25025c)

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

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

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

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 536dc95..06b412f 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -752,7 +752,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (void)performClose:(id)sender
 {
     if (b_dark_interface)
+    {
         [self orderOut: sender];
+        [[VLCCoreInteraction sharedInstance] stop];
+    }
     else
         [super performClose: sender];
 }
@@ -760,7 +763,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
 - (void)performMiniaturize:(id)sender
 {
     if (b_dark_interface)
+    {
         [self miniaturize: sender];
+        [[VLCCoreInteraction sharedInstance] pause];
+    }
     else
         [super performMiniaturize: sender];
 }
diff --git a/modules/gui/macosx/MainWindowTitle.m b/modules/gui/macosx/MainWindowTitle.m
index f200885..effee09 100644
--- a/modules/gui/macosx/MainWindowTitle.m
+++ b/modules/gui/macosx/MainWindowTitle.m
@@ -158,7 +158,7 @@
 - (IBAction)buttonAction:(id)sender
 {
     if (sender == o_red_btn)
-        [[self window] orderOut: sender];
+        [[self window] performClose: sender];
     else if (sender == o_yellow_btn)
         [[self window] miniaturize: sender];
     else if (sender == o_green_btn)



More information about the vlc-commits mailing list