From b020ec6ada150e165d1295827100e2f55ee1b079 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 14 Sep 2021 17:08:39 +0200 Subject: macOS: don't block CMD+H while a popup is open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/cocoa/qcocoamenuloader.mm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoamenuloader.mm') 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]; } -- cgit v1.2.3