changeset 27962:048184bb751e

(x_alloc_lighter_color, x_setup_relief_color): Use x_free_colors.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 02 Mar 2000 13:26:21 +0000
parents c6664d216f5a
children 0e2c6e5cca6e
files src/xterm.c
diffstat 1 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Thu Mar 02 13:24:54 2000 +0000
+++ b/src/xterm.c	Thu Mar 02 13:26:21 2000 +0000
@@ -3261,15 +3261,7 @@
 	{
 	  /* If we end up with the same color as before, try adding
 	     delta to the RGB values.  */
-	  int class = FRAME_X_DISPLAY_INFO (f)->visual->class;
-	  
-	  /* If display has an immutable color map, freeing colors is
-	     not necessary and some servers don't allow it.  So don't
-	     do it.  */
-	  if (class != StaticColor
-	      && class != StaticGray
-	      && class != TrueColor)
-	    XFreeColors (display, cmap, &new.pixel, 1, 0);
+	  x_free_colors (f, &new.pixel, 1);
 	  
 	  new.red = min (0xffff, delta + color.red);
 	  new.green = min (0xffff, delta + color.green);
@@ -3320,11 +3312,7 @@
     {
       /* If display has an immutable color map, freeing colors is not
 	 necessary and some servers don't allow it.  So don't do it.  */
-      int class = dpyinfo->visual->class;
-      if (class != StaticColor
-	  && class != StaticGray
-	  && class != TrueColor)
-	XFreeColors (dpy, cmap, &relief->pixel, 1, 0);
+      x_free_colors (f, &relief->pixel, 1);
       relief->allocated_p = 0;
     }