Fix argb initialisation.
authorJosé Dapena Paz <jdapena@igalia.com>
Mon, 8 Mar 2010 14:37:36 +0000 (15:37 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 10 Mar 2010 00:13:37 +0000 (00:13 +0000)
Fix clutter initialisation if argb visuals are enabled, setting a border
color on creating the dummy window. This should avoid BadMatch happening
when the depth of the root window visual is not the same of the depth
of the argb visual.

http://bugzilla.openedhand.com/show_bug.cgi?id=2011

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/glx/clutter-backend-glx.c

index d77eda2..8b171af 100644 (file)
@@ -555,6 +555,7 @@ clutter_backend_glx_create_context (ClutterBackend  *backend,
                                     root_xwin,
                                     xvisinfo->visual,
                                     AllocNone);
+  attrs.border_pixel = 0;
 
   backend_glx->dummy_xwin = XCreateWindow (xdisplay, root_xwin,
                                            -100, -100, 1, 1,
@@ -562,7 +563,7 @@ clutter_backend_glx_create_context (ClutterBackend  *backend,
                                            xvisinfo->depth,
                                            CopyFromParent,
                                            xvisinfo->visual,
-                                           CWOverrideRedirect | CWColormap,
+                                           CWOverrideRedirect | CWColormap | CWBorderPixel,
                                            &attrs);
 
   /* Try and create a GLXWindow to use with extensions dependent on