Mercurial > emacs
diff src/xfns.c @ 40427:979757645800
(x_build_heuristic_mask): Use x_alloc_image_color.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 28 Oct 2001 20:55:50 +0000 |
parents | 1eec9125d32e |
children | 1ee61682a51f |
line wrap: on
line diff
--- a/src/xfns.c Sun Oct 28 19:28:52 2001 +0000 +++ b/src/xfns.c Sun Oct 28 20:55:50 2001 +0000 @@ -8196,17 +8196,9 @@ if (i == 3 && NILP (how)) { char color_name[30]; - XColor exact, color; - Colormap cmap; - sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]); - - cmap = FRAME_X_COLORMAP (f); - if (XLookupColor (dpy, cmap, color_name, &exact, &color)) - { - bg = color.pixel; - use_img_background = 0; - } + bg = x_alloc_image_color (f, img, build_string (color_name), 0); + use_img_background = 0; } }