From b19db4861f552a2571a97dab590f6fdf59c5c81b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 8 Mar 2022 08:41:15 +0800 Subject: [PATCH] Fix choice of visuals for XPM icon * src/xterm.c (x_bitmap_icon): Allow using XPM icon on StaticColor and StaticGray as well. --- src/xterm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 60cd57b8512..e20f9ca406d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13988,7 +13988,9 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) #elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) /* This allocates too many colors. */ - if (FRAME_X_VISUAL_INFO (f)->class == TrueColor + if ((FRAME_X_VISUAL_INFO (f)->class == TrueColor + || FRAME_X_VISUAL_INFO (f)->class == StaticColor + || FRAME_X_VISUAL_INFO (f)->class == StaticGray) /* That pixmap needs about 240 colors, and we should also leave some more space for other colors as well. */ -- 2.39.5