[vlc-commits] macosx: handle Lion's fullscreen shortcut in addition to our own keys ( close #6313)
Felix Paul Kühne
git at videolan.org
Sun Mar 4 19:06:48 CET 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Mar 4 19:05:41 2012 +0100| [b7b260e385f8c57bf0b7a2aaecc56fbd5db62e9f] | committer: Felix Paul Kühne
macosx: handle Lion's fullscreen shortcut in addition to our own keys (close #6313)
(cherry picked from commit d7df112353124aa073b1b9fcb741ae24a3e1e7d1)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=b7b260e385f8c57bf0b7a2aaecc56fbd5db62e9f
---
modules/gui/macosx/VideoView.m | 3 +++
modules/gui/macosx/intf.m | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index 6351417..350d4c1 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -120,6 +120,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if( var_GetBool( p_playlist, "fullscreen") )
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
+ /* handle Lion's default key combo for fullscreen-toggle in addition to our own hotkeys */
+ else if( key == 'f' && i_pressed_modifiers & NSControlKeyMask && i_pressed_modifiers & NSCommandKeyMask )
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
else if ( p_vout )
{
if( key == ' ' )
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f382302..9e110e2 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1299,6 +1299,13 @@ unsigned int CocoaKeyToVLC( unichar i_key )
key = [[o_event charactersIgnoringModifiers] characterAtIndex: 0];
+ /* handle Lion's default key combo for fullscreen-toggle in addition to our own hotkeys */
+ if( key == 'f' && i_pressed_modifiers & NSControlKeyMask && i_pressed_modifiers & NSCommandKeyMask )
+ {
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
+ return YES;
+ }
+
switch( key )
{
case NSDeleteCharacter:
More information about the vlc-commits
mailing list