From c040ba18aec6ef2b65d394e47b103fe14841dd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 28 May 2014 09:11:26 +0200 Subject: [PATCH] Dummy window for creating GLX context should be override redirect Without having the dummy window being override redirect Qt might confuse window managers. Window managers might react on the create notify event, but there is no reason to do anything with the window as it is most likely already destroyed at the time the window manager receives the create notify event. By marking the window as override redirect we indicate to the window manager that they can ignore it. Change-Id: I35259436da4548f4190b92de412fb0de1d2e8077 Reviewed-by: Uli Schlachter Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qglxintegration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index 7304930b8b0..c18764a4bb3 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -91,11 +91,12 @@ static Window createDummyWindow(Display *dpy, XVisualInfo *visualInfo, int scree a.background_pixel = WhitePixel(dpy, screenNumber); a.border_pixel = BlackPixel(dpy, screenNumber); a.colormap = cmap; + a.override_redirect = true; Window window = XCreateWindow(dpy, rootWin, 0, 0, 100, 100, 0, visualInfo->depth, InputOutput, visualInfo->visual, - CWBackPixel|CWBorderPixel|CWColormap, &a); + CWBackPixel|CWBorderPixel|CWColormap|CWOverrideRedirect, &a); #ifndef QT_NO_DEBUG XStoreName(dpy, window, "Qt GLX dummy window"); #endif