From e54112b46747ada712f902c2e08aaadfe97c238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 5 Jun 2020 12:50:43 +0200 Subject: [PATCH] macOS: Respect window type when determining main window status Fixes: QTBUG-84405 Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516 Reviewed-by: Timur Pocheptsov (cherry picked from commit 1cd7cbf6179692fc824dc3ba15580372493a4355) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qnswindow.mm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm index 6b4e110af27..1a74fd73f86 100644 --- a/src/plugins/platforms/cocoa/qnswindow.mm +++ b/src/plugins/platforms/cocoa/qnswindow.mm @@ -227,14 +227,12 @@ static bool isMouseEvent(NSEvent *ev) - (BOOL)canBecomeMainWindow { - BOOL canBecomeMain = YES; // By default, windows can become the main window - // Windows with a transient parent (such as combobox popup windows) // cannot become the main window: if (!m_platformWindow || m_platformWindow->window()->transientParent()) - canBecomeMain = NO; + return NO; - return canBecomeMain; + return [super canBecomeMainWindow]; } - (BOOL)worksWhenModal