Commit 9056d31f authored by Jérome Decoodt's avatar Jérome Decoodt

Add Ctrl+clic to handle one button mice

parent 81ad2fc1
...@@ -456,9 +456,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -456,9 +456,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if( p_vout ) if( p_vout )
{ {
switch( [o_event type] ) if( ( [o_event type] == NSLeftMouseDown ) &&
{ ( ! ( [o_event modifierFlags] & NSControlKeyMask ) ) )
case NSLeftMouseDown:
{ {
if( [o_event clickCount] <= 1 ) if( [o_event clickCount] <= 1 )
{ {
...@@ -473,18 +472,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -473,18 +472,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self toggleFullscreen]; [self toggleFullscreen];
} }
} }
break; else if( ( [o_event type] == NSRightMouseDown ) ||
case NSRightMouseDown: ( ( [o_event type] == NSLeftMouseDown ) &&
( [o_event modifierFlags] & NSControlKeyMask ) ) )
{ {
msg_Dbg( p_vout, "received NSRightMouseDown (generic method)" ); msg_Dbg( p_vout, "received NSRightMouseDown (generic method) or Ctrl clic" );
[NSMenu popUpContextMenu: [[VLCMain sharedInstance] getVoutMenu] withEvent: o_event forView: [[[VLCMain sharedInstance] getControls] getVoutView]]; [NSMenu popUpContextMenu: [[VLCMain sharedInstance] getVoutMenu] withEvent: o_event forView: [[[VLCMain sharedInstance] getControls] getVoutView]];
} }
break; else
default:
[super mouseDown: o_event]; [super mouseDown: o_event];
break;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment