summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-03-13 16:50:05 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-14 09:45:07 +0100
commit9a68dd015674a6c23764640977d83c272336d9c7 (patch)
treec974b8218bae2dbe4898b25c5b03117a7d5938a4 /src/plugins
parent22494ea8e82d5d5588e67e8067f0273687ed9098 (diff)
Made sure first created xcb window still receives focus.
Change 50ca45f059524293790 caused mapped windows to not receive focus by default. The _NET_WM_USER_TIME spec says that if the user time is set to 0 (or CurrentTime), the window will not be initially focused. Thus, if the connection time has not yet been set, we skip this part to restore the old behavior. Change-Id: I19de3602c78629ad2bc65f5e1976313949c82c4c Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins')
-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 055defde08..54b3b214b1 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -549,7 +549,8 @@ void QXcbWindow::show()
updateNetWmStateBeforeMap();
}
- updateNetWmUserTime(connection()->time());
+ if (connection()->time() != CurrentTime)
+ updateNetWmUserTime(connection()->time());
Q_XCB_CALL(xcb_map_window(xcb_connection(), m_window));
xcb_flush(xcb_connection());