summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-10-30 15:17:11 +0000
committerGerd Moellmann <gerd@gnu.org>2000-10-30 15:17:11 +0000
commitcae71efec19433b8324223f5a001f9c97399bf45 (patch)
treed6fe64e436ee85d3f5c88d871c0f3579deb99227
parent35efe0a1169d72779aa63bbcab9250c2cbc9e014 (diff)
downloademacs-cae71efec19433b8324223f5a001f9c97399bf45.tar.gz
(x_alloc_nearest_color): Fix last change to compare
RGB values.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xterm.c4
2 files changed, 6 insertions, 1 deletions
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 <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.
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;