changeset 28199:56a776500341

* 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.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 19 Mar 2000 17:00:51 +0000
parents 1ea4cf592264
children 74c497c73315
files src/xfns.c
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Sun Mar 19 15:56:40 2000 +0000
+++ b/src/xfns.c	Sun Mar 19 17:00:51 2000 +0000
@@ -4622,20 +4622,7 @@
       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);
     }
 }