From e033d59c944c6d25ebbefcfd0760d81c5b9eca99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 2 Aug 2012 15:18:57 +0200 Subject: [PATCH] Fixed popups getting blocked by modal windows. In the case of a file dialog with a completer, the completion list view is a popup that is not a transient child of the file dialog. Thus it ends up getting its blockedByModal flag set due to the file dialog window being a modal window. To prevent this we make sure popups don't get blocked by modal windows, as they were special cased and processed before modal windows in Qt 4.x. Change-Id: Id5688cfb1534541cd1678b1e53d75e34a68f9b8e Reviewed-by: Lars Knoll Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a4d07603ef..af899cf792 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -432,7 +432,7 @@ QWindow *QGuiApplication::modalWindow() void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window) { bool shouldBeBlocked = false; - if (window->windowType() != Qt::Tool && !self->modalWindowList.isEmpty()) + if ((window->windowType() & Qt::Popup) != Qt::Popup && !self->modalWindowList.isEmpty()) shouldBeBlocked = self->isWindowBlocked(window); if (shouldBeBlocked != window->d_func()->blockedByModalWindow) {