aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-03-02 13:26:21 +0000
committerGerd Moellmann <[email protected]>2000-03-02 13:26:21 +0000
commit0d605c677672709321656e69a30bab37b70da8ff (patch)
tree9acda6438c927d9177c7e79c9002edf76667e405 /src/xterm.c
parent2ad412d7812a5df9672cae0df97545e0d68af75e (diff)
(x_alloc_lighter_color, x_setup_relief_color): Use
x_free_colors.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 32c3515075..cb26ec1df5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3261,15 +3261,7 @@ x_alloc_lighter_color (f, display, cmap, pixel, factor, delta)
{
/* 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 @@ x_setup_relief_color (f, relief, factor, delta, default_pixel)
{
/* 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;
}