summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-03-25 13:38:54 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-03-25 13:38:54 (GMT)
commite0bd0b685c913e6bf1b1f46ed28fc233aa5694ac (patch)
treea67834b5030461f149d4a1e47736b0d4cf07042e /src/gui/kernel/qapplication.cpp
parent761cac16eb0a6d32f9e7d558867c5c1bbfb244f9 (diff)
parent9b40f0275043566a6e1f1471e1f608dd66929b81 (diff)
downloadQt-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.cpp4
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);
}
}