summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanZhao <juan.j.zhao@intel.com>2011-04-12 07:37:53 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-04-12 07:37:53 (GMT)
commit0aef3363aca14b0ba6ac56f86cadeb4acdef729e (patch)
tree947af93f24bb4028761c80591fdbebc10a7f0d1f
parent22c35fb59aee3ae2cb70be891b4f0e376f4ff5c5 (diff)
downloadQt-0aef3363aca14b0ba6ac56f86cadeb4acdef729e.zip
Qt-0aef3363aca14b0ba6ac56f86cadeb4acdef729e.tar.gz
Qt-0aef3363aca14b0ba6ac56f86cadeb4acdef729e.tar.bz2
Update XCreateWindow in qgl_X11egl.cpp
XCreateWindow should provide mask and colormap, or this may load XCreateWindow error in the server side. Merge-request: 1183 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r--src/opengl/qgl_x11egl.cpp10
1 files changed, 9 insertions, 1 deletions
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);