diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-11-09 15:37:35 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-10 05:25:55 +0000 |
commit | 1689fe2b810304161a8449d36b6dfb845c90eb09 (patch) | |
tree | 52131cc84ec94e3fd6b8143b3d86ef0da49f4294 | |
parent | 1a33e443903b9c61e49bcb3247340a85c58ca286 (diff) |
Cocoa: Allow CMD+H to hide the application when a tooltip is visible
Since native applications allow CMD+H to hide an application when the
tooltip is visible then we should do too. Other popup windows will
still block the call.
Fixes: QTBUG-82626
Change-Id: Ieac86d6b3cb2152a3ba82d8bd850f13bfeedb7c8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5f2b53f13c40c31da21d8352312962bb97cb8c97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenuloader.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm index a7c17fc177..5f7c361a3d 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm @@ -322,7 +322,8 @@ return [NSApp validateMenuItem:menuItem]; if (menuItem.action == @selector(hide:)) { - if (QCocoaIntegration::instance()->activePopupWindow()) + auto *w = QCocoaIntegration::instance()->activePopupWindow(); + if (w && (w->window()->type() != Qt::ToolTip)) return NO; return [NSApp validateMenuItem:menuItem]; } |