2001-10-28 Gerd Moellmann <gerd@gnu.org>
+ * 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.
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;
}
}