]> Dogcows Code - chaz/openbox/commitdiff
removed a piece of code I suspect has never been run
authorDerek Foreman <manmower@gmail.com>
Thu, 22 May 2003 20:53:18 +0000 (20:53 +0000)
committerDerek Foreman <manmower@gmail.com>
Thu, 22 May 2003 20:53:18 +0000 (20:53 +0000)
this is for XServers that report less than 8 bpp default visual and support
8bpp or higher visuals

hopefully nothing is really that stupid.  we'll see.

render/render.c

index c556998eef4673f3ee44be3a65f974d1788837a3..78c15019266c288432a47730089c7f7ecd100102 100644 (file)
@@ -31,40 +31,6 @@ void render_startup(void)
     render_visual = DefaultVisual(ob_display, ob_screen);
     render_colormap = DefaultColormap(ob_display, ob_screen);
 
-    if (render_depth < 8) {
-      XVisualInfo vinfo_template, *vinfo_return;
-      /* search for a TrueColor Visual... if we can't find one...
-         we will use the default visual for the screen */
-      int vinfo_nitems;
-      int best = -1;
-
-      vinfo_template.screen = ob_screen;
-      vinfo_template.class = TrueColor;
-      vinfo_return = XGetVisualInfo(ob_display,
-                                    VisualScreenMask | VisualClassMask,
-                                    &vinfo_template, &vinfo_nitems);
-      if (vinfo_return) {
-        int i;
-        int max_depth = 1;
-        for (i = 0; i < vinfo_nitems; ++i) {
-          if (vinfo_return[i].depth > max_depth) {
-            if (max_depth == 24 && vinfo_return[i].depth > 24)
-                break;          /* prefer 24 bit over 32 */
-            max_depth = vinfo_return[i].depth;
-            best = i;
-          }
-        }
-        if (max_depth < render_depth) best = -1;
-      }
-      if (best != -1) {
-        render_depth = vinfo_return[best].depth;
-        render_visual = vinfo_return[best].visual;
-        render_colormap = XCreateColormap(ob_display, ob_root, render_visual,
-                                          AllocNone);
-        render_visual_info = vinfo_return[best];
-      }
-      XFree(vinfo_return);
-    }  
   switch (render_visual->class) {
   case TrueColor:
     truecolor_startup();
This page took 0.024807 seconds and 4 git commands to generate.