From 1f70da62a73e3a10fe1ceb33d11f79fc29586fcf Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 4 Feb 2010 16:28:29 +0000 Subject: [PATCH] glx: Create a colormap for the dummy window Otherwise X will fail to create the window and throw a BadMatch error at least on NVidia. --- clutter/glx/clutter-backend-glx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clutter/glx/clutter-backend-glx.c b/clutter/glx/clutter-backend-glx.c index 1a8b28f..cafeeaf 100644 --- a/clutter/glx/clutter-backend-glx.c +++ b/clutter/glx/clutter-backend-glx.c @@ -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", -- 2.7.4