diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 15 |
1 files changed, 1 insertions, 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) | |||
| 4622 | if (n_visuals != 1) | 4622 | if (n_visuals != 1) |
| 4623 | fatal ("Can't get proper X visual info"); | 4623 | fatal ("Can't get proper X visual info"); |
| 4624 | 4624 | ||
| 4625 | if ((1 << vinfo->depth) == vinfo->colormap_size) | 4625 | dpyinfo->n_planes = vinfo->depth; |
| 4626 | dpyinfo->n_planes = vinfo->depth; | ||
| 4627 | else | ||
| 4628 | { | ||
| 4629 | int i = 0; | ||
| 4630 | int n = vinfo->colormap_size - 1; | ||
| 4631 | while (n) | ||
| 4632 | { | ||
| 4633 | n = n >> 1; | ||
| 4634 | i++; | ||
| 4635 | } | ||
| 4636 | dpyinfo->n_planes = i; | ||
| 4637 | } | ||
| 4638 | |||
| 4639 | XFree ((char *) vinfo); | 4626 | XFree ((char *) vinfo); |
| 4640 | } | 4627 | } |
| 4641 | } | 4628 | } |