From 9a68dd015674a6c23764640977d83c272336d9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 13 Mar 2012 16:50:05 +0100 Subject: [PATCH] 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 Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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());