summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-02-05 16:19:48 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-02-05 16:19:48 (GMT)
commit9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7 (patch)
treecb0434abc1dc4c89d02ba8da9ec65114c0109fc7 /src/gui
parent045a6447397c522de2c904e760a08b75fcd0c002 (diff)
downloadQt-9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7.zip
Qt-9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7.tar.gz
Qt-9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7.tar.bz2
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')
-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 6a36293..8cab387 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();
}