glx: Create a colormap for the dummy window
authorNeil Roberts <neil@linux.intel.com>
Thu, 4 Feb 2010 16:28:29 +0000 (16:28 +0000)
committerNeil Roberts <neil@linux.intel.com>
Thu, 4 Feb 2010 16:35:42 +0000 (16:35 +0000)
Otherwise X will fail to create the window and throw a BadMatch error
at least on NVidia.

clutter/glx/clutter-backend-glx.c

index 1a8b28f..cafeeaf 100644 (file)
@@ -538,13 +538,18 @@ clutter_backend_glx_create_context (ClutterBackend  *backend,
   clutter_x11_trap_x_errors ();
 
   attrs.override_redirect = True;
+  attrs.colormap = XCreateColormap (xdisplay,
+                                    root_xwin,
+                                    xvisinfo->visual,
+                                    AllocNone);
+
   backend_glx->dummy_xwin = XCreateWindow (xdisplay, root_xwin,
                                            -100, -100, 1, 1,
                                            0,
                                            xvisinfo->depth,
                                            CopyFromParent,
                                            xvisinfo->visual,
-                                           CWOverrideRedirect,
+                                           CWOverrideRedirect | CWColormap,
                                            &attrs);
 
   CLUTTER_NOTE (BACKEND, "Selecting dummy 0x%x for the GLX context",