aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2003-08-29 16:17:38 +0000
committerRichard M. Stallman <[email protected]>2003-08-29 16:17:38 +0000
commite125a2e67ddfbd9341d9db633a898a868c8c8976 (patch)
treefdb66c7bf4d8e75d6c194ca3c3ff64047f5ce93b /src/dispnew.c
parent14970b4546e1f6072b031477e2e838eb380dfcbd (diff)
(adjust_glyph_matrix): Call window_box whenever W is nonzero.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 88f6a45223..b12208d6fd 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -625,20 +625,23 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
int left = -1, right = -1;
int window_width = -1, window_height;
- /* See if W had a header line that has disappeared now, or vice versa. */
+ /* See if W had a header line that has disappeared now, or vice versa.
+ Get W's size. */
if (w)
{
+ window_box (w, -1, 0, 0, &window_width, &window_height);
+
header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
header_line_changed_p = header_line_p != matrix->header_line_p;
}
matrix->header_line_p = header_line_p;
- /* Do nothing if MATRIX' size, position, vscroll, and marginal areas
+ /* If POOL is null, MATRIX is a window matrix for window-based redisplay.
+ Do nothing if MATRIX' size, position, vscroll, and marginal areas
haven't changed. This optimization is important because preserving
the matrix means preventing redisplay. */
if (matrix->pool == NULL)
{
- window_box (w, -1, 0, 0, &window_width, &window_height);
left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
xassert (left >= 0 && right >= 0);
@@ -723,7 +726,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
else
{
/* If MATRIX->pool is null, MATRIX is responsible for managing
- its own memory. Allocate glyph memory from the heap. */
+ its own memory. It is a window matrix for window-based redisplay.
+ Allocate glyph memory from the heap. */
if (dim.width > matrix->matrix_w
|| new_rows
|| header_line_changed_p