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 <psychon@znc.in>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Martin Gräßlin 2014-05-28 09:11:26 +02:00 committed by The Qt Project
parent 51f6651d4c
commit c040ba18ae

View File

@ -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