aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 32c35150755..cb26ec1df5d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3261,15 +3261,7 @@ x_alloc_lighter_color (f, display, cmap, pixel, factor, delta)
3261 { 3261 {
3262 /* If we end up with the same color as before, try adding 3262 /* If we end up with the same color as before, try adding
3263 delta to the RGB values. */ 3263 delta to the RGB values. */
3264 int class = FRAME_X_DISPLAY_INFO (f)->visual->class; 3264 x_free_colors (f, &new.pixel, 1);
3265
3266 /* If display has an immutable color map, freeing colors is
3267 not necessary and some servers don't allow it. So don't
3268 do it. */
3269 if (class != StaticColor
3270 && class != StaticGray
3271 && class != TrueColor)
3272 XFreeColors (display, cmap, &new.pixel, 1, 0);
3273 3265
3274 new.red = min (0xffff, delta + color.red); 3266 new.red = min (0xffff, delta + color.red);
3275 new.green = min (0xffff, delta + color.green); 3267 new.green = min (0xffff, delta + color.green);
@@ -3320,11 +3312,7 @@ x_setup_relief_color (f, relief, factor, delta, default_pixel)
3320 { 3312 {
3321 /* If display has an immutable color map, freeing colors is not 3313 /* If display has an immutable color map, freeing colors is not
3322 necessary and some servers don't allow it. So don't do it. */ 3314 necessary and some servers don't allow it. So don't do it. */
3323 int class = dpyinfo->visual->class; 3315 x_free_colors (f, &relief->pixel, 1);
3324 if (class != StaticColor
3325 && class != StaticGray
3326 && class != TrueColor)
3327 XFreeColors (dpy, cmap, &relief->pixel, 1, 0);
3328 relief->allocated_p = 0; 3316 relief->allocated_p = 0;
3329 } 3317 }
3330 3318