macOS: Respect window type when determining main window status
Fixes: QTBUG-84405 Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 1cd7cbf6179692fc824dc3ba15580372493a4355) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
This commit is contained in:
parent
b11508aa54
commit
f7f5919558
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user