Do not fail user time window creation when xcb is using xlib
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 14 Oct 2011 21:04:09 +0000 (00:04 +0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 17 Oct 2011 08:28:25 +0000 (10:28 +0200)
commit86ea95259d3fe827e340b4691710d7d971efc35a
treee7a65e504bff4c5bdb9782a95fa13bc0437e7b01
parent83611473acf442d8e7e3fea818e2e33114451b5f
Do not fail user time window creation when xcb is using xlib

QXcbWindow::updateNetWmUserTime() creates a new window using the
actual window as its parent. This operation was failing when Xlib
usage and GLX (or EGL) was enabled because in these cases the real
window was created with a different visual using XCreateWindow.

For the user time window however we were passing the xcb_screen's
root_visual always, and this cannot work when Xlib+GLX/EGL is in use,
resulting in a BAD_MATCH (followed by some annoying flicker on the
screen on Ubuntu at least, or a full log off (X crash?) on Fedora).

The patch saves the visual id used to create the actual window and
passes that when creating the user time window. This way the creation
of the user time window succeeds with Xlib+GLX too.

Change-Id: If3925d9ac1670d385dcc7c2b475c196908569f06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/plugins/platforms/xcb/qxcbwindow.cpp
src/plugins/platforms/xcb/qxcbwindow.h