diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-09-14 17:08:39 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-09-15 17:49:35 +0200 |
commit | b020ec6ada150e165d1295827100e2f55ee1b079 (patch) | |
tree | 7aee12df7e809335c8d9c24e1e9584801204be1e /src/plugins/platforms/cocoa | |
parent | 65c9acc5f529689f609ebec5e6aae59a171982e4 (diff) |
macOS: don't block CMD+H while a popup is open
The shortcut hides the application, which works in native apps such as
Xcode or Safari also while a popup menu (or combobox drop down) is open.
This essentially reverts 29104c85db53e7c0c0aaf3fe78f84b737fce4886, which
introduced the blocking of CMD+H to prevent the popup stack in the Cocoa
plugin from going out of sync. With that stack gone after the previous
commits, this is no longer a problem.
Task-number: QTBUG-82626
Task-number: QTBUG-96450
Task-number: QTBUG-58727
Pick-to: 6.2
Change-Id: I35603d971741f03b793b7839b183b7ab37200647
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenuloader.mm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm index ba37b40f5e..50072b4e51 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm @@ -320,13 +320,8 @@ - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { if (menuItem.action == @selector(hideOtherApplications:) - || menuItem.action == @selector(unhideAllApplications:)) - return [NSApp validateMenuItem:menuItem]; - - if (menuItem.action == @selector(hide:)) { - auto *w = QCocoaIntegration::instance()->activePopupWindow(); - if (w && (w->window()->type() != Qt::ToolTip)) - return NO; + || menuItem.action == @selector(unhideAllApplications:) + || menuItem.action == @selector(hide:)) { return [NSApp validateMenuItem:menuItem]; } |