summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-06-13 17:05:52 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-18 21:58:30 +0200
commit7967cb4f4860df436dc2e7e21c4eaca6a9b05f70 (patch)
tree7ea97e7dd0f56900d8b1304e22d2c6b659d08c36 /src/gui/kernel/qwindow.cpp
parent3c8eb404877df9c967d81fa9df7d718c538fb407 (diff)
Prevent ending up in a state where focus is perpetually grabbed.
Mouse / enter / leave / key events etc are all blocked when a window has the blockedByModalWindow flag set. The problem appears if a QWindow is created and only later directly or indirectly parented to a modal window that's currently showing. Since the decision on whether a window should be blocked or not is based on its parent / transient parent chain, we need to reevaluate the blocked status each time the parent or transient parent of a window changes. Task-number: QTBUG-26112 Change-Id: Ida6b118b556fe26d17fa86335a0fe7baddc7eaf8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index f30a794b55..d6f0aab50d 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -360,6 +360,8 @@ void QWindow::setParent(QWindow *parent)
}
d->parentWindow = parent;
+
+ QGuiApplicationPrivate::updateBlockedStatus(this);
}
/*!
@@ -784,6 +786,8 @@ void QWindow::setTransientParent(QWindow *parent)
{
Q_D(QWindow);
d->transientParent = parent;
+
+ QGuiApplicationPrivate::updateBlockedStatus(this);
}
/*!