From: Po Lu Date: Tue, 8 Mar 2022 00:41:15 +0000 (+0800) Subject: Fix choice of visuals for XPM icon X-Git-Tag: emacs-29.0.90~1964 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b19db4861f552a2571a97dab590f6fdf59c5c81b;p=emacs.git Fix choice of visuals for XPM icon * src/xterm.c (x_bitmap_icon): Allow using XPM icon on StaticColor and StaticGray as well. --- 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. */