commit 976863511ef18a861b23b2a52879424ad331347d
Author: György Balló <ballogy@freestart.hu>
Date:   Mon Oct 31 18:06:21 2011 +0100

    cogl-winsys-glx: fix fallback to RGB visuals
    
    A comment says that if RGBA visuals not found, we fall back to using an RGB config. But it's not happened in fact. This patch fixes this problem.

diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index c5558f2..597db72 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -457,7 +457,7 @@ update_winsys_features (CoglContext *context, GError **error)
  * an explicit boolean status. */
 static gboolean
 find_fbconfig (CoglDisplay *display,
-               gboolean with_alpha,
+               gboolean *support_transparent_windows,
                GLXFBConfig *config_ret,
                GError **error)
 {
@@ -493,7 +493,7 @@ find_fbconfig (CoglDisplay *display,
       goto done;
     }
 
-  if (with_alpha)
+  if (support_transparent_windows)
     {
       for (i = 0; i < n_configs; i++)
         {
@@ -516,18 +516,14 @@ find_fbconfig (CoglDisplay *display,
 
       /* If we make it here then we didn't find an RGBA config so
          we'll fall back to using an RGB config */
-      g_set_error (error, COGL_WINSYS_ERROR,
-                   COGL_WINSYS_ERROR_CREATE_CONTEXT,
-                   "Unable to find fbconfig with rgba visual");
-      ret = FALSE;
-      goto done;
-    }
-  else
-    {
-      COGL_NOTE (WINSYS, "Using the first available FBConfig");
-      *config_ret = configs[0];
+      g_warning ("Unable to find fbconfig with rgba visual, "
+                 "fall back to using an RGB config");
+      *support_transparent_windows = FALSE;
     }
 
+  COGL_NOTE (WINSYS, "Using the first available FBConfig");
+  *config_ret = configs[0];
+
 done:
   XFree (configs);
   return ret;
@@ -557,7 +553,7 @@ create_context (CoglDisplay *display, GError **error)
     support_transparent_windows = FALSE;
 
   glx_display->found_fbconfig =
-    find_fbconfig (display, support_transparent_windows, &config,
+    find_fbconfig (display, &support_transparent_windows, &config,
                    &fbconfig_error);
   if (!glx_display->found_fbconfig)
     {
