From: Gerd Moellmann Date: Mon, 30 Oct 2000 15:17:11 +0000 (+0000) Subject: (x_alloc_nearest_color): Fix last change to compare X-Git-Tag: emacs-pretest-21.0.90~416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cae71efec19433b8324223f5a001f9c97399bf45;p=emacs.git (x_alloc_nearest_color): Fix last change to compare RGB values. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0e880dbc0b6..bfeecdf3385 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-10-30 Gerd Moellmann + * 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. diff --git a/src/xterm.c b/src/xterm.c index 556611286bc..838e6472c7f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3422,7 +3422,9 @@ x_alloc_nearest_color (f, cmap, color) 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;