From 0aef3363aca14b0ba6ac56f86cadeb4acdef729e Mon Sep 17 00:00:00 2001 From: JuanZhao Date: Tue, 12 Apr 2011 09:37:53 +0200 Subject: Update XCreateWindow in qgl_X11egl.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XCreateWindow should provide mask and colormap, or this may load XCreateWindow error in the server side. Merge-request: 1183 Reviewed-by: Samuel Rødal --- src/opengl/qgl_x11egl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 5755067..2ddfd35 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -105,10 +105,18 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *) return; } + XSetWindowAttributes attr; + unsigned long mask; + attr.background_pixel = 0; + attr.border_pixel = 0; + attr.colormap = XCreateColormap(X11->display, DefaultRootWindow(X11->display), vi->visual, AllocNone); + attr.event_mask = StructureNotifyMask | ExposureMask; + mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; + d->window = XCreateWindow(X11->display, RootWindow(X11->display, screen), 0, 0, 1, 1, 0, vi->depth, InputOutput, vi->visual, - 0, 0); + mask, &attr); d->surface = eglCreateWindowSurface(d->display, config, (EGLNativeWindowType) d->window, NULL); -- cgit v0.12