From 94ac875b4113108a02e2a2c15df16d77acadc557 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Sun, 19 Mar 2000 17:00:51 +0000 Subject: [PATCH] * xfns.c (select_visual): Don't set dpyinfo->n_planes to the number of bits per RGB because it's everywhere used as the depth of the visual. --- src/xfns.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index 8ed9b7d98d9..a08f74eccbf 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4622,20 +4622,7 @@ select_visual (dpyinfo) if (n_visuals != 1) fatal ("Can't get proper X visual info"); - if ((1 << vinfo->depth) == vinfo->colormap_size) - dpyinfo->n_planes = vinfo->depth; - else - { - int i = 0; - int n = vinfo->colormap_size - 1; - while (n) - { - n = n >> 1; - i++; - } - dpyinfo->n_planes = i; - } - + dpyinfo->n_planes = vinfo->depth; XFree ((char *) vinfo); } } -- 2.39.5