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>
This commit is contained in:
parent
65c9acc5f5
commit
b020ec6ada
@ -320,13 +320,8 @@
|
|||||||
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
|
- (BOOL)validateMenuItem:(NSMenuItem*)menuItem
|
||||||
{
|
{
|
||||||
if (menuItem.action == @selector(hideOtherApplications:)
|
if (menuItem.action == @selector(hideOtherApplications:)
|
||||||
|| menuItem.action == @selector(unhideAllApplications:))
|
|| menuItem.action == @selector(unhideAllApplications:)
|
||||||
return [NSApp validateMenuItem:menuItem];
|
|| menuItem.action == @selector(hide:)) {
|
||||||
|
|
||||||
if (menuItem.action == @selector(hide:)) {
|
|
||||||
auto *w = QCocoaIntegration::instance()->activePopupWindow();
|
|
||||||
if (w && (w->window()->type() != Qt::ToolTip))
|
|
||||||
return NO;
|
|
||||||
return [NSApp validateMenuItem:menuItem];
|
return [NSApp validateMenuItem:menuItem];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user