]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix choice of visuals for XPM icon
authorPo Lu <luangruo@yahoo.com>
Tue, 8 Mar 2022 00:41:15 +0000 (08:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 8 Mar 2022 00:41:15 +0000 (08:41 +0800)
* src/xterm.c (x_bitmap_icon): Allow using XPM icon on
StaticColor and StaticGray as well.

src/xterm.c

index 60cd57b8512dc293582b815461f5b87607eee674..e20f9ca406d3f1c0db275c9910bff837950af852 100644 (file)
@@ -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.  */