aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c8
-rw-r--r--src/fileio.c1
-rw-r--r--src/w32fns.c3
-rw-r--r--src/w32term.h4
-rw-r--r--src/xdisp.c65
5 files changed, 56 insertions, 25 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index b2a257090cc..9af1ce259d4 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -534,6 +534,14 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
534 eassert (left >= 0 && right >= 0); 534 eassert (left >= 0 && right >= 0);
535 matrix->left_margin_glyphs = left; 535 matrix->left_margin_glyphs = left;
536 matrix->right_margin_glyphs = right; 536 matrix->right_margin_glyphs = right;
537
538 /* If we are resizing a window, make sure the previous mode-line
539 row of the window's current matrix is no longer marked as such. */
540 if (w && matrix == w->current_matrix
541 && matrix->nrows > 0
542 && dim.height != matrix->nrows
543 && matrix->nrows <= matrix->rows_allocated)
544 MATRIX_MODE_LINE_ROW (matrix)->mode_line_p = false;
537 } 545 }
538 546
539 /* Number of rows to be used by MATRIX. */ 547 /* Number of rows to be used by MATRIX. */
diff --git a/src/fileio.c b/src/fileio.c
index 6e2fe2f0b82..34934dd6df6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4975,6 +4975,7 @@ Optional fourth argument APPEND if non-nil means
4975Optional fifth argument VISIT, if t or a string, means 4975Optional fifth argument VISIT, if t or a string, means
4976 set the last-save-file-modtime of buffer to this file's modtime 4976 set the last-save-file-modtime of buffer to this file's modtime
4977 and mark buffer not modified. 4977 and mark buffer not modified.
4978If VISIT is t, the buffer is marked as visiting FILENAME.
4978If VISIT is a string, it is a second file name; 4979If VISIT is a string, it is a second file name;
4979 the output goes to FILENAME, but the buffer is marked as visiting VISIT. 4980 the output goes to FILENAME, but the buffer is marked as visiting VISIT.
4980 VISIT is also the file name to lock and unlock for clash detection. 4981 VISIT is also the file name to lock and unlock for clash detection.
diff --git a/src/w32fns.c b/src/w32fns.c
index 75e0d531a23..61e22e57009 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2146,6 +2146,9 @@ w32_set_undecorated (struct frame *f, Lisp_Object new_value, Lisp_Object old_val
2146 | SWP_FRAMECHANGED); 2146 | SWP_FRAMECHANGED);
2147 FRAME_UNDECORATED (f) = false; 2147 FRAME_UNDECORATED (f) = false;
2148 } 2148 }
2149
2150 f->output_data.w32->dwStyle = GetWindowLong (hwnd, GWL_STYLE);
2151
2149 unblock_input (); 2152 unblock_input ();
2150} 2153}
2151 2154
diff --git a/src/w32term.h b/src/w32term.h
index 5a54f542365..737764b8942 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -371,6 +371,10 @@ struct w32_output
371 /* Non-hourglass cursor that is currently active. */ 371 /* Non-hourglass cursor that is currently active. */
372 HCURSOR current_cursor; 372 HCURSOR current_cursor;
373 373
374 /* The window style for this frame. Set up when the frame is
375 created and updated when adding/removing decorations in
376 w32_set_undecorated. Used by w32_set_window_size to adjust the
377 frame's window rectangle. */
374 DWORD dwStyle; 378 DWORD dwStyle;
375 379
376 /* This is the Emacs structure for the display this frame is on. */ 380 /* This is the Emacs structure for the display this frame is on. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 6b677b63ae4..4856a7b13b6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1093,44 +1093,59 @@ window_box_height (struct window *w)
1093 1093
1094 /* Note: the code below that determines the mode-line/header-line/tab-line 1094 /* Note: the code below that determines the mode-line/header-line/tab-line
1095 height is essentially the same as that contained in the macro 1095 height is essentially the same as that contained in the macro
1096 CURRENT_{MODE,HEADER}_LINE_HEIGHT, except that it checks whether 1096 CURRENT_{MODE,HEADER,TAB}_LINE_HEIGHT, except that it checks whether
1097 the appropriate glyph row has its `mode_line_p' flag set, 1097 the appropriate glyph row has its `mode_line_p' flag set, and if
1098 and if it doesn't, uses estimate_mode_line_height instead. */ 1098 it doesn't, uses estimate_mode_line_height instead. */
1099 1099
1100 if (window_wants_mode_line (w)) 1100 if (window_wants_mode_line (w))
1101 { 1101 {
1102 struct glyph_row *ml_row 1102 if (w->mode_line_height >= 0)
1103 = (w->current_matrix && w->current_matrix->rows 1103 height -= w->mode_line_height;
1104 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
1105 : 0);
1106 if (ml_row && ml_row->mode_line_p)
1107 height -= ml_row->height;
1108 else 1104 else
1109 height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w)); 1105 {
1106 struct glyph_row *ml_row
1107 = (w->current_matrix && w->current_matrix->rows
1108 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
1109 : 0);
1110 if (ml_row && ml_row->mode_line_p)
1111 height -= ml_row->height;
1112 else
1113 height -= estimate_mode_line_height (f,
1114 CURRENT_MODE_LINE_FACE_ID (w));
1115 }
1110 } 1116 }
1111 1117
1112 if (window_wants_tab_line (w)) 1118 if (window_wants_tab_line (w))
1113 { 1119 {
1114 struct glyph_row *tl_row 1120 if (w->tab_line_height >= 0)
1115 = (w->current_matrix && w->current_matrix->rows 1121 height -= w->tab_line_height;
1116 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
1117 : 0);
1118 if (tl_row && tl_row->mode_line_p)
1119 height -= tl_row->height;
1120 else 1122 else
1121 height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID); 1123 {
1124 struct glyph_row *tl_row
1125 = (w->current_matrix && w->current_matrix->rows
1126 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
1127 : 0);
1128 if (tl_row && tl_row->mode_line_p)
1129 height -= tl_row->height;
1130 else
1131 height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID);
1132 }
1122 } 1133 }
1123 1134
1124 if (window_wants_header_line (w)) 1135 if (window_wants_header_line (w))
1125 { 1136 {
1126 struct glyph_row *hl_row 1137 if (w->header_line_height >= 0)
1127 = (w->current_matrix && w->current_matrix->rows 1138 height -= w->header_line_height;
1128 ? MATRIX_HEADER_LINE_ROW (w->current_matrix) 1139 {
1129 : 0); 1140 struct glyph_row *hl_row
1130 if (hl_row && hl_row->mode_line_p) 1141 = (w->current_matrix && w->current_matrix->rows
1131 height -= hl_row->height; 1142 ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
1132 else 1143 : 0);
1133 height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID); 1144 if (hl_row && hl_row->mode_line_p)
1145 height -= hl_row->height;
1146 else
1147 height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
1148 }
1134 } 1149 }
1135 1150
1136 /* With a very small font and a mode-line that's taller than 1151 /* With a very small font and a mode-line that's taller than