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,
if( p_vout )
{
switch( [o_event type] )
{
case NSLeftMouseDown:
if( ( [o_event type] == NSLeftMouseDown ) &&
( ! ( [o_event modifierFlags] & NSControlKeyMask ) ) )
{
if( [o_event clickCount] <= 1 )
{
......@@ -473,18 +472,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self toggleFullscreen];
}
}
break;
case NSRightMouseDown:
else if( ( [o_event type] == 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]];
}
break;
default:
else
[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