Mercurial > emacs
changeset 35261:ba1f849f9381
(x_set_mouse_color): Fix color allocation.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 12 Jan 2001 12:38:21 +0000 |
parents | a1bf8f8663bd |
children | be492f742a75 |
files | src/xfns.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Fri Jan 12 11:51:31 2001 +0000 +++ b/src/xfns.c Fri Jan 12 12:38:21 2001 +0000 @@ -1373,8 +1373,7 @@ struct frame *f; Lisp_Object arg, oldval; { - unsigned long pixel - = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); + unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); unload_color (f, f->output_data.x->foreground_pixel); f->output_data.x->foreground_pixel = pixel; @@ -1398,8 +1397,7 @@ struct frame *f; Lisp_Object arg, oldval; { - unsigned long pixel - = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); + unsigned long pixel = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); unload_color (f, f->output_data.x->background_pixel); f->output_data.x->background_pixel = pixel; @@ -1447,7 +1445,10 @@ /* Don't let pointers be invisible. */ if (mask_color == pixel && mask_color == f->output_data.x->background_pixel) - pixel = f->output_data.x->foreground_pixel; + { + x_free_colors (f, &pixel, 1); + pixel = x_copy_color (f, f->output_data.x->foreground_pixel); + } unload_color (f, f->output_data.x->mouse_pixel); f->output_data.x->mouse_pixel = pixel;