]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_alloc_nearest_color): Fix last change to compare
authorGerd Moellmann <gerd@gnu.org>
Mon, 30 Oct 2000 15:17:11 +0000 (15:17 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 30 Oct 2000 15:17:11 +0000 (15:17 +0000)
RGB values.

src/ChangeLog
src/xterm.c

index 0e880dbc0b6d4e1b4e7402e64d10b130f1333ba2..bfeecdf3385ac511f2eea1db96dbd654feb5deb0 100644 (file)
@@ -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.
index 556611286bc2fc2a2c6fcf2ea39c1332512a4839..838e6472c7f9497874cfb06cbdf35a54e71358d9 100644 (file)
@@ -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;