macOS: don't replay mouse presses that closed a popup

On macOS, we only follow the native behavior to not replay mouse
presses outside of a popup because we close popups in the QPA
plugin before any popup-specific logic in QApplication kicks in,
so a press that closed a popup is never seen by Qt at all.

Before we can remove the popup closing code from the QPA plugin,
implement the existing platform style hint for Cocoa to prevent
mouse press replays.

Change-Id: I2328f706ba148ece2d0e3fb4e71fe9123ab5e205
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Volker Hilsheimer 2021-09-08 15:28:04 +02:00
parent 6ecd157487
commit 8bb11d0337

View File

@ -412,6 +412,8 @@ QVariant QCocoaIntegration::styleHint(StyleHint hint) const
return QCoreTextFontEngine::fontSmoothingGamma();
case ShowShortcutsInContextMenus:
return QVariant(false);
case ReplayMousePressOutsidePopup:
return QVariant(false);
default: break;
}