# HG changeset patch # User Gerd Moellmann # Date 1004302550 0 # Node ID 979757645800a35dfd3faadd9403e3305c6fe60c # Parent bb16255e7f21ce33b2e5fd0358e7dfac7b35fb95 (x_build_heuristic_mask): Use x_alloc_image_color. diff -r bb16255e7f21 -r 979757645800 src/xfns.c --- 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; } }