summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_win.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-06-09 11:08:32 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-06-09 11:18:22 (GMT)
commit08e2c776bf2ce6976276bcdcce342ae8c4675565 (patch)
treeda612cc23e634d661c3eee74a6ea099e0a03f962 /src/gui/kernel/qwidget_win.cpp
parent317e2c9199da58879b083b5561a69612ae0a4a41 (diff)
downloadQt-08e2c776bf2ce6976276bcdcce342ae8c4675565.zip
Qt-08e2c776bf2ce6976276bcdcce342ae8c4675565.tar.gz
Qt-08e2c776bf2ce6976276bcdcce342ae8c4675565.tar.bz2
Fix regression in popup behavior on Windows
Popups without a parent would unintentionally deactivate their parents following af7d2b2127d. In order to avoid this, we do not activate popups when there is an active application window. System tray popups are still activated. Reviewed-by: denis Task-number: QTBUG-11061
Diffstat (limited to 'src/gui/kernel/qwidget_win.cpp')
-rw-r--r--src/gui/kernel/qwidget_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 9c65aa0..0f05c6b 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1167,7 +1167,7 @@ void QWidgetPrivate::show_sys()
// This is to resolve the problem where popups are opened from the
// system tray and not being implicitly activated
if (q->windowType() == Qt::Popup &&
- (!q->parentWidget() || !q->parentWidget()->isActiveWindow()))
+ !q->parentWidget() && !qApp->activeWindow())
q->activateWindow();
}