From c00accbd2541ffac4004c5ea138f7d9164fe3af5 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 22 May 2003 20:53:18 +0000 Subject: [PATCH] removed a piece of code I suspect has never been run 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 | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/render/render.c b/render/render.c index c556998e..78c15019 100644 --- a/render/render.c +++ b/render/render.c @@ -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(); -- 2.45.2