aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-08-29 16:17:38 +0000
committerRichard M. Stallman2003-08-29 16:17:38 +0000
commite125a2e67ddfbd9341d9db633a898a868c8c8976 (patch)
treefdb66c7bf4d8e75d6c194ca3c3ff64047f5ce93b /src
parent14970b4546e1f6072b031477e2e838eb380dfcbd (diff)
downloademacs-e125a2e67ddfbd9341d9db633a898a868c8c8976.tar.gz
emacs-e125a2e67ddfbd9341d9db633a898a868c8c8976.zip
(adjust_glyph_matrix): Call window_box whenever W is nonzero.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 88f6a452236..b12208d6fdc 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -625,20 +625,23 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
625 int left = -1, right = -1; 625 int left = -1, right = -1;
626 int window_width = -1, window_height; 626 int window_width = -1, window_height;
627 627
628 /* See if W had a header line that has disappeared now, or vice versa. */ 628 /* See if W had a header line that has disappeared now, or vice versa.
629 Get W's size. */
629 if (w) 630 if (w)
630 { 631 {
632 window_box (w, -1, 0, 0, &window_width, &window_height);
633
631 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); 634 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
632 header_line_changed_p = header_line_p != matrix->header_line_p; 635 header_line_changed_p = header_line_p != matrix->header_line_p;
633 } 636 }
634 matrix->header_line_p = header_line_p; 637 matrix->header_line_p = header_line_p;
635 638
636 /* Do nothing if MATRIX' size, position, vscroll, and marginal areas 639 /* If POOL is null, MATRIX is a window matrix for window-based redisplay.
640 Do nothing if MATRIX' size, position, vscroll, and marginal areas
637 haven't changed. This optimization is important because preserving 641 haven't changed. This optimization is important because preserving
638 the matrix means preventing redisplay. */ 642 the matrix means preventing redisplay. */
639 if (matrix->pool == NULL) 643 if (matrix->pool == NULL)
640 { 644 {
641 window_box (w, -1, 0, 0, &window_width, &window_height);
642 left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols); 645 left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
643 right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols); 646 right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
644 xassert (left >= 0 && right >= 0); 647 xassert (left >= 0 && right >= 0);
@@ -723,7 +726,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
723 else 726 else
724 { 727 {
725 /* If MATRIX->pool is null, MATRIX is responsible for managing 728 /* If MATRIX->pool is null, MATRIX is responsible for managing
726 its own memory. Allocate glyph memory from the heap. */ 729 its own memory. It is a window matrix for window-based redisplay.
730 Allocate glyph memory from the heap. */
727 if (dim.width > matrix->matrix_w 731 if (dim.width > matrix->matrix_w
728 || new_rows 732 || new_rows
729 || header_line_changed_p 733 || header_line_changed_p