Return the actual modal window in QGuiApplicationPrivate::isWindowBlocked
The method erroneously returns the common ancestor of the |window| in question and a modal window in case of window-modality of the modal window. What should be returned is the modal window because it is the one that blocks the |window|. Fixes: QTBUG-106627 Change-Id: Ib4da6c1e9757629bbedbd8a16407cd6b5b0d5d27 Pick-to: 6.4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
c2df659c8d
commit
56eb4badb5
@ -899,7 +899,7 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
|
||||
auto *current = window;
|
||||
do {
|
||||
if (current->isAncestorOf(modalWindow, QWindow::IncludeTransients)) {
|
||||
*blockingWindow = current;
|
||||
*blockingWindow = modalWindow;
|
||||
return true;
|
||||
}
|
||||
current = current->parent(QWindow::IncludeTransients);
|
||||
|
Loading…
Reference in New Issue
Block a user