summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qwidget_win.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-02-05 17:19:48 +0100
committerJens Bache-Wiig <jbache@trolltech.com>2010-02-05 17:19:48 +0100
commit9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7 (patch)
treecb0434abc1dc4c89d02ba8da9ec65114c0109fc7 /src/gui/kernel/qwidget_win.cpp
parent045a6447397c522de2c904e760a08b75fcd0c002 (diff)
downloadqt4-tools-9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7.tar.gz
Revised fix for system tray popup activation
Change af7d2b2127dadbdf828c60c75255bb1b4f591651 does have some negative side-effects. This should limit the fix to void unnecessary activation when the parent window already has focus. Reviewed-by: denis
Diffstat (limited to 'src/gui/kernel/qwidget_win.cpp')
-rw-r--r--src/gui/kernel/qwidget_win.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 6a36293d3b..8cab387eab 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1156,7 +1156,10 @@ void QWidgetPrivate::show_sys()
data.window_state |= Qt::WindowMinimized;
if (IsZoomed(q->internalWinId()))
data.window_state |= Qt::WindowMaximized;
- if (q->windowType() == Qt::Popup)
+ // 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->activateWindow();
}