emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b19db4861f: Fix choice of visuals for XPM icon


From: Po Lu
Subject: master b19db4861f: Fix choice of visuals for XPM icon
Date: Mon, 7 Mar 2022 19:42:06 -0500 (EST)

branch: master
commit b19db4861f552a2571a97dab590f6fdf59c5c81b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 60cd57b851..e20f9ca406 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.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]