From: Gerd Moellmann Date: Sun, 28 Oct 2001 20:59:58 +0000 (+0000) Subject: (x_build_heuristic_mask): Use x_alloc_image_color. X-Git-Tag: emacs-21.2~435 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3b04b7498dcfad28e84327506f4279ba9afca197;p=emacs.git (x_build_heuristic_mask): Use x_alloc_image_color. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9bb59b9b2d4..a04151c381f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2001-10-28 Gerd Moellmann + * xfns.c (x_build_heuristic_mask): Use x_alloc_image_color. + * xfns.c (x_build_heuristic_mask): Fix a bug not incrementing a loop counter. diff --git a/src/xfns.c b/src/xfns.c index 7f42c14b3b0..6643cc28871 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -8064,17 +8064,9 @@ x_build_heuristic_mask (f, img, how) 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; - look_at_corners_p = 0; - } + bg = x_alloc_image_color (f, img, build_string (color_name), 0); + look_at_corners_p = 0; } }