Made sure first created xcb window still receives focus.
authorSamuel Rødal <samuel.rodal@nokia.com>
Tue, 13 Mar 2012 15:50:05 +0000 (16:50 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 14 Mar 2012 08:45:07 +0000 (09:45 +0100)
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>
src/plugins/platforms/xcb/qxcbwindow.cpp

index 055defd..54b3b21 100644 (file)
@@ -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());