]> code.delx.au - gnu-emacs/commitdiff
* xfns.c (select_visual): Don't set dpyinfo->n_planes to the
authorGerd Moellmann <gerd@gnu.org>
Sun, 19 Mar 2000 17:00:51 +0000 (17:00 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sun, 19 Mar 2000 17:00:51 +0000 (17:00 +0000)
number of bits per RGB because it's everywhere used as the depth
of the visual.

src/xfns.c

index 8ed9b7d98d9ed7c2492635c7763beca98b34970e..a08f74eccbf3728bff02288432ff9e25a08502fb 100644 (file)
@@ -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);
     }
 }