[vlc-commits] macosx: same action for show playlist menu item and playlist button
David Fuhrmann
git at videolan.org
Wed Apr 24 20:20:11 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Apr 24 20:16:19 2013 +0200| [3cc27bce2b634e228916b39c2bbf390f572af55b] | committer: David Fuhrmann
macosx: same action for show playlist menu item and playlist button
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3cc27bce2b634e228916b39c2bbf390f572af55b
---
modules/gui/macosx/MainWindow.m | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index a27ec5d..07fc41a 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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))
More information about the vlc-commits
mailing list