macOS: Activate non-modal windows during modal session if they support it
Commit 593ab63860 ensured that non-modal windows would not be activated
during a modal session, which makes sense for windows that can't be
interacted with. But some windows can, and we should activate them
as normal.
Task-number: QTBUG-46304
Change-Id: I4a9b7ec53157b042d4d6e9535336fa3254f41e0e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
parent
f4889e63c7
commit
d04c9e23ff
|
|
@ -376,8 +376,11 @@ void QCocoaWindow::setVisible(bool visible)
|
|||
} else if (window()->modality() == Qt::ApplicationModal) {
|
||||
// Show the window as application modal
|
||||
eventDispatcher()->beginModalSession(window());
|
||||
} else if (m_view.window.canBecomeKeyWindow && !eventDispatcher()->hasModalSession()) {
|
||||
[m_view.window makeKeyAndOrderFront:nil];
|
||||
} else if (m_view.window.canBecomeKeyWindow) {
|
||||
if (!NSApp.modalWindow || m_view.window.worksWhenModal)
|
||||
[m_view.window makeKeyAndOrderFront:nil];
|
||||
else
|
||||
[m_view.window orderFront:nil];
|
||||
} else {
|
||||
[m_view.window orderFront:nil];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue