2000-10-30 Gerd Moellmann <gerd@gnu.org>
+ * xterm.c (x_alloc_nearest_color): Fix last change to compare
+ RGB values.
+
* xterm.c (x_alloc_nearest_color): If allocation succeeds, and
we have a color cache, check that the cached color equals the
allocated color. If not, clear the color cache.
if (dpyinfo->color_cells
&& (cached_color = &dpyinfo->color_cells[color->pixel],
- cached_color->pixel != color->pixel))
+ (cached_color->red != color->red
+ || cached_color->blue != color->blue
+ || cached_color->green != color->green)))
{
xfree (dpyinfo->color_cells);
dpyinfo->color_cells = NULL;