From 7967cb4f4860df436dc2e7e21c4eaca6a9b05f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 13 Jun 2012 17:05:52 +0200 Subject: 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 Reviewed-by: Bradley T. Hughes --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 76f0a71270..a564120a3b 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -168,6 +168,7 @@ public: QWindowList modalWindowList; static void showModalWindow(QWindow *window); static void hideModalWindow(QWindow *window); + static void updateBlockedStatus(QWindow *window); virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const; static Qt::MouseButtons buttons; -- cgit v1.2.3