src/opengl/qglpixelbuffer_x11.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
--- a/src/opengl/qglpixelbuffer_x11.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/opengl/qglpixelbuffer_x11.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -181,7 +181,11 @@
 
     qt_format_to_attrib_list(f, attribs);
 
-    GLXFBConfig *configs = glXChooseFBConfig(X11->display, X11->defaultScreen, attribs, &num_configs);
+    int screen = X11->defaultScreen;
+    if (shareWidget)
+        screen = shareWidget->x11Info().screen();
+
+    GLXFBConfig *configs = glXChooseFBConfig(X11->display, screen, attribs, &num_configs);
     if (configs && num_configs) {
         int res;
         glXGetFBConfigAttrib(X11->display, configs[0], GLX_LEVEL, &res);