aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xfns.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 6d0d959fb09..4c0ac3fcc5a 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1373,8 +1373,7 @@ x_set_foreground_color (f, arg, oldval)
1373 struct frame *f; 1373 struct frame *f;
1374 Lisp_Object arg, oldval; 1374 Lisp_Object arg, oldval;
1375{ 1375{
1376 unsigned long pixel 1376 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
1377 = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
1378 1377
1379 unload_color (f, f->output_data.x->foreground_pixel); 1378 unload_color (f, f->output_data.x->foreground_pixel);
1380 f->output_data.x->foreground_pixel = pixel; 1379 f->output_data.x->foreground_pixel = pixel;
@@ -1398,8 +1397,7 @@ x_set_background_color (f, arg, oldval)
1398 struct frame *f; 1397 struct frame *f;
1399 Lisp_Object arg, oldval; 1398 Lisp_Object arg, oldval;
1400{ 1399{
1401 unsigned long pixel 1400 unsigned long pixel = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
1402 = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
1403 1401
1404 unload_color (f, f->output_data.x->background_pixel); 1402 unload_color (f, f->output_data.x->background_pixel);
1405 f->output_data.x->background_pixel = pixel; 1403 f->output_data.x->background_pixel = pixel;
@@ -1447,7 +1445,10 @@ x_set_mouse_color (f, arg, oldval)
1447 /* Don't let pointers be invisible. */ 1445 /* Don't let pointers be invisible. */
1448 if (mask_color == pixel 1446 if (mask_color == pixel
1449 && mask_color == f->output_data.x->background_pixel) 1447 && mask_color == f->output_data.x->background_pixel)
1450 pixel = f->output_data.x->foreground_pixel; 1448 {
1449 x_free_colors (f, &pixel, 1);
1450 pixel = x_copy_color (f, f->output_data.x->foreground_pixel);
1451 }
1451 1452
1452 unload_color (f, f->output_data.x->mouse_pixel); 1453 unload_color (f, f->output_data.x->mouse_pixel);
1453 f->output_data.x->mouse_pixel = pixel; 1454 f->output_data.x->mouse_pixel = pixel;