Rework the command+click functionality a bit to ensure we're not mistakenly simulating a right click where we shouldn't.

master
Geenz 2013-07-11 22:07:17 -04:00
parent 2f680eec93
commit dea416fd83
1 changed files with 7 additions and 1 deletions

View File

@ -243,7 +243,13 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (void) mouseDown:(NSEvent *)theEvent
{
// Apparently people still use this?
if ([theEvent modifierFlags] & NSControlKeyMask)
if ([theEvent modifierFlags] & NSCommandKeyMask &&
!([theEvent modifierFlags] & NSControlKeyMask) &&
!([theEvent modifierFlags] & NSShiftKeyMask) &&
!([theEvent modifierFlags] & NSAlternateKeyMask) &&
!([theEvent modifierFlags] & NSAlphaShiftKeyMask) &&
!([theEvent modifierFlags] & NSFunctionKeyMask) &&
!([theEvent modifierFlags] & NSHelpKeyMask))
{
callRightMouseDown(mMousePos, mModifiers);
mSimulatedRightClick = true;