summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-22 11:08:32 +0200
committerLiang Qi <liang.qi@qt.io>2016-10-22 21:19:57 +0200
commit28628a5d5e6c55512759ceafc644aa31e444b781 (patch)
tree221d1ab0995afe0d441f1ddb433aee985f6d41ea /src/plugins/platforms/xcb/qxcbwindow.cpp
parentcbb2ba23e203374132e4b134b1c8f1a3626d2378 (diff)
parent686c44a69b13f6e884dd2b6d9991f4cd94597c5a (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/plugins/platforms/eglfs/qeglfshooks.cpp Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 15616c1cea..f744b34901 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1685,9 +1685,11 @@ void QXcbWindow::requestActivateWindow()
m_deferredActivation = false;
updateNetWmUserTime(connection()->time());
+ QWindow *focusWindow = QGuiApplication::focusWindow();
if (window()->isTopLevel()
&& !(window()->flags() & Qt::X11BypassWindowManagerHint)
+ && (!focusWindow || !window()->isAncestorOf(focusWindow))
&& connection()->wmSupport()->isSupportedByWM(atom(QXcbAtom::_NET_ACTIVE_WINDOW))) {
xcb_client_message_event_t event;
@@ -1698,7 +1700,6 @@ void QXcbWindow::requestActivateWindow()
event.type = atom(QXcbAtom::_NET_ACTIVE_WINDOW);
event.data.data32[0] = 1;
event.data.data32[1] = connection()->time();
- QWindow *focusWindow = QGuiApplication::focusWindow();
event.data.data32[2] = focusWindow ? focusWindow->winId() : XCB_NONE;
event.data.data32[3] = 0;
event.data.data32[4] = 0;