[vlc-commits] macosx: allow to hide the drop zone while the playlist is empty using an option-click on the playlist toggle button (refs #6213)

Felix Paul Kühne git at videolan.org
Sat Mar 10 18:20:03 CET 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Mar 10 18:18:42 2012 +0100| [d74d16d142c2d60392a395902fcf2e9ec2c8ccb9] | committer: Felix Paul Kühne

macosx: allow to hide the drop zone while the playlist is empty using an option-click on the playlist toggle button (refs #6213)
(cherry picked from commit 51cbd1c24870eec1b386ee978d4ebcaae4a0ac9e)

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

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

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index e9e4566..1c77807 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -643,6 +643,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
     BOOL b_activeVideo = [[VLCMain sharedInstance] activeVideoPlayback];
     BOOL b_restored = NO;
 
+    if (b_dropzone_active && !b_activeVideo && ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0)
+    {
+        b_dropzone_active = NO;
+        [self hideDropZone];
+        return;
+    }
+
     if ( !b_splitview_removed && ( (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0 && b_activeVideo)
                                   || (b_nonembedded && sender != nil)
                                   || (!b_activeVideo && sender != nil)
@@ -666,12 +673,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
                 b_restored = YES;
         }
 
-        if (b_dropzone_active && !b_activeVideo)
-        {
-            b_dropzone_active = NO;
-            [self hideDropZone];
-        }
-
         if (!b_nonembedded)
         {
             if (([o_video_view isHidden] && b_activeVideo) || b_restored ) {



More information about the vlc-commits mailing list