]> git.sesse.net Git - vlc/commitdiff
macosx: same action for show playlist menu item and playlist button
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Wed, 24 Apr 2013 18:16:19 +0000 (20:16 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Wed, 24 Apr 2013 18:16:19 +0000 (20:16 +0200)
Previous code recognized the alt value in Cmd+alt+p as an alt value,
even if the user does not really want to hide the window contents when using
the shortcut.

modules/gui/macosx/MainWindow.m

index a27ec5d9c04e8634229a0402ab6a282d68dd0e7b..07fc41a7a7c9f3ae8f85479e7a83dd5ffb5d8792 100644 (file)
@@ -472,12 +472,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if (b_nativeFullscreenMode && b_fullscreen && b_activeVideo && sender != nil)
         return;
 
-    if (b_dropzone_active && ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0) {
+    BOOL b_have_alt_key = ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0;
+    if (sender && [sender isKindOfClass: [NSMenuItem class]])
+        b_have_alt_key = NO;
+
+    if (b_dropzone_active && b_have_alt_key) {
         [self hideDropZone];
         return;
     }
 
-    if (!(b_nativeFullscreenMode && b_fullscreen) && !b_splitview_removed && ((([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0 && b_activeVideo)
+    if (!(b_nativeFullscreenMode && b_fullscreen) && !b_splitview_removed && ((b_have_alt_key && b_activeVideo)
                                                                               || (b_nonembedded && sender != nil)
                                                                               || (!b_activeVideo && sender != nil)
                                                                               || b_minimized_view))