aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xterm.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 484f1c50d56..0e880dbc0b6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12000-10-30 Gerd Moellmann <gerd@gnu.org> 12000-10-30 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xterm.c (x_alloc_nearest_color): If allocation succeeds, and
4 we have a color cache, check that the cached color equals the
5 allocated color. If not, clear the color cache.
6
3 * window.c (displayed_window_lines): Change buffers if necessary. 7 * window.c (displayed_window_lines): Change buffers if necessary.
4 Fix computation of displayed lines. 8 Fix computation of displayed lines.
5 9
diff --git a/src/xterm.c b/src/xterm.c
index a55117ba8dc..556611286bc 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3412,6 +3412,23 @@ x_alloc_nearest_color (f, cmap, color)
3412 color->blue = cells[nearest].blue; 3412 color->blue = cells[nearest].blue;
3413 rc = XAllocColor (display, cmap, color); 3413 rc = XAllocColor (display, cmap, color);
3414 } 3414 }
3415 else
3416 {
3417 /* If allocation succeeded, and the allocated pixel color is not
3418 equal to a cached pixel color recorded earlier, there was a
3419 change in the colormap, so clear the color cache. */
3420 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3421 XColor *cached_color;
3422
3423 if (dpyinfo->color_cells
3424 && (cached_color = &dpyinfo->color_cells[color->pixel],
3425 cached_color->pixel != color->pixel))
3426 {
3427 xfree (dpyinfo->color_cells);
3428 dpyinfo->color_cells = NULL;
3429 dpyinfo->ncolor_cells = 0;
3430 }
3431 }
3415 3432
3416#ifdef DEBUG_X_COLORS 3433#ifdef DEBUG_X_COLORS
3417 if (rc) 3434 if (rc)