diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-03-25 13:38:54 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-03-25 13:38:54 (GMT) |
commit | e0bd0b685c913e6bf1b1f46ed28fc233aa5694ac (patch) | |
tree | a67834b5030461f149d4a1e47736b0d4cf07042e /src/gui/kernel/qapplication.cpp | |
parent | 761cac16eb0a6d32f9e7d558867c5c1bbfb244f9 (diff) | |
parent | 9b40f0275043566a6e1f1471e1f608dd66929b81 (diff) | |
download | Qt-e0bd0b685c913e6bf1b1f46ed28fc233aa5694ac.zip Qt-e0bd0b685c913e6bf1b1f46ed28fc233aa5694ac.tar.gz Qt-e0bd0b685c913e6bf1b1f46ed28fc233aa5694ac.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 9c70208..e52ec70 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2462,7 +2462,9 @@ void QApplication::setActiveWindow(QWidget* act) } else { // If the focus widget is not in the activate_window, clear the focus w = QApplicationPrivate::focus_widget; - if (w && !QApplicationPrivate::active_window->isAncestorOf(w)) + if (!w && QApplicationPrivate::active_window->focusPolicy() != Qt::NoFocus) + QApplicationPrivate::setFocusWidget(QApplicationPrivate::active_window, Qt::ActiveWindowFocusReason); + else if (!QApplicationPrivate::active_window->isAncestorOf(w)) QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason); } } |