macOS: Simplify Ctrl+LeftMouse->RightMouse handling

Change-Id: I080bfaec273ea45809d72e513add16b7114c7bbb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-07-09 17:06:05 +02:00
parent 5db69cb5de
commit 3dedb5292d

View File

@ -429,8 +429,7 @@
if ([self hasMarkedText]) {
[[NSTextInputContext currentInputContext] handleEvent:theEvent];
} else {
auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
if (!m_dontOverrideCtrlLMB && QCocoaKeyMapper::fromCocoaModifiers(theEvent.modifierFlags) & ctrlOrMetaModifier) {
if (!m_dontOverrideCtrlLMB && (theEvent.modifierFlags & NSEventModifierFlagControl)) {
m_buttons |= Qt::RightButton;
m_sendUpAsRightButton = true;
} else {