[vlc-commits] macosx: fixed pl counter and make sure we pause the input on minimaturize ( closes #5809)

Felix Paul Kühne git at videolan.org
Sun Jan 8 14:07:02 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jan  8 14:05:52 2012 +0100| [af6ffdaac40af9e5622e7521693f0186865e0e97] | committer: Felix Paul Kühne

macosx: fixed pl counter and make sure we pause the input on minimaturize (closes #5809)

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

 modules/gui/macosx/MainWindow.m |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 5af29ea..07895d0 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -442,6 +442,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [o_time_sld_fancygradient_view removeFromSuperviewWithoutNeedingDisplay];
 
     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillClose:) name: NSWindowWillCloseNotification object: nil];
+    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillMiniaturize:) name: NSWindowWillMiniaturizeNotification object:nil];
 }
 
 #pragma mark -
@@ -1054,6 +1055,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     else
         [self showDropZone];
     PL_UNLOCK;
+    [o_sidebar_view setNeedsDisplay:YES];
 }
 
 - (void)setPause
@@ -1239,6 +1241,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [[VLCCoreInteraction sharedInstance] stop];
 }
 
+- (void)someWindowWillMiniaturize:(NSNotification *)notification
+{
+    if([notification object] == o_nonembedded_window || [notification object] == self)
+        [[VLCCoreInteraction sharedInstance] pause];
+}
+
 #pragma mark -
 #pragma mark Fullscreen support
 - (void)showFullscreenController
@@ -1849,7 +1857,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         NSInteger i_playlist_size;
 
         PL_LOCK;
-        i_playlist_size = playlist_CurrentSize( p_playlist );
+        i_playlist_size = p_playlist->items.i_size;
         PL_UNLOCK;
 
         return i_playlist_size;



More information about the vlc-commits mailing list