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 29104c85db
, 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
|
||||
{
|
||||
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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user