From 15781beda80fffa6c2dca1b5b32da8f0b4b3b306 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 10 Feb 2022 20:00:47 +0800 Subject: [PATCH] Enable TrueColor allocation optimizations on all visuals * src/xterm.c (x_alloc_nearest_color): Enable optimizations on 32-bit TrueColor visuals that legitimately don't have an alpha mask. --- src/xterm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 469077c8972..095ed316cfa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3292,9 +3292,7 @@ x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) gamma_correct (f, color); - if (dpyinfo->red_bits > 0 - && (dpyinfo->n_planes != 32 - || dpyinfo->alpha_bits > 0)) + if (dpyinfo->red_bits > 0) { color->pixel = x_make_truecolor_pixel (dpyinfo, color->red, -- 2.39.5