diff options
| author | Gerd Moellmann | 2000-10-30 15:17:11 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-10-30 15:17:11 +0000 |
| commit | cae71efec19433b8324223f5a001f9c97399bf45 (patch) | |
| tree | d6fe64e436ee85d3f5c88d871c0f3579deb99227 /src | |
| parent | 35efe0a1169d72779aa63bbcab9250c2cbc9e014 (diff) | |
| download | emacs-cae71efec19433b8324223f5a001f9c97399bf45.tar.gz emacs-cae71efec19433b8324223f5a001f9c97399bf45.zip | |
(x_alloc_nearest_color): Fix last change to compare
RGB values.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xterm.c | 4 |
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 @@ | |||
| 1 | 2000-10-30 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-10-30 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xterm.c (x_alloc_nearest_color): Fix last change to compare | ||
| 4 | RGB values. | ||
| 5 | |||
| 3 | * xterm.c (x_alloc_nearest_color): If allocation succeeds, and | 6 | * xterm.c (x_alloc_nearest_color): If allocation succeeds, and |
| 4 | we have a color cache, check that the cached color equals the | 7 | we have a color cache, check that the cached color equals the |
| 5 | allocated color. If not, clear the color cache. | 8 | 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) | |||
| 3422 | 3422 | ||
| 3423 | if (dpyinfo->color_cells | 3423 | if (dpyinfo->color_cells |
| 3424 | && (cached_color = &dpyinfo->color_cells[color->pixel], | 3424 | && (cached_color = &dpyinfo->color_cells[color->pixel], |
| 3425 | cached_color->pixel != color->pixel)) | 3425 | (cached_color->red != color->red |
| 3426 | || cached_color->blue != color->blue | ||
| 3427 | || cached_color->green != color->green))) | ||
| 3426 | { | 3428 | { |
| 3427 | xfree (dpyinfo->color_cells); | 3429 | xfree (dpyinfo->color_cells); |
| 3428 | dpyinfo->color_cells = NULL; | 3430 | dpyinfo->color_cells = NULL; |