summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-01-03 07:50:15 -0800
committerGlenn Morris <rgm@gnu.org>2020-01-03 07:50:15 -0800
commitfa7148fd5ac7c10c32a1cdcf57ade55bc3be8718 (patch)
tree18f9bc1b56ea13026d5b3f40bcd3be9d0f39d634 /src
parent2ab5bc323b374bb8385e8032db1ccd08ac36bb84 (diff)
parent06364316e0998d6906b8a42d54102c5de4a54990 (diff)
downloademacs-fa7148fd5ac7c10c32a1cdcf57ade55bc3be8718.tar.gz
emacs-fa7148fd5ac7c10c32a1cdcf57ade55bc3be8718.tar.bz2
emacs-fa7148fd5ac7c10c32a1cdcf57ade55bc3be8718.zip
Merge from origin/emacs-27
06364316e0 (origin/emacs-27) * lisp/net/tramp.el (tramp-file-local-na... d3884f50e0 Adapt commentary in Tramp persistency file 2d82f5a44e Change Tramp version to 2.4.3.27.1 09b65707cc ; * src/dispnew.c (adjust_glyph_matrix): Fix last change. 37f9182b68 Fix redisplay when mode-line-format changes mode-line's he... 1420906b81 * src/fileio.c (Fwrite_region): Improve the doc string. 01dfcb7c87 Fix removal of frame decorations on Windows (Bug#38705)
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
eassert (left >= 0 && right >= 0);
matrix->left_margin_glyphs = left;
matrix->right_margin_glyphs = right;
+
+ /* If we are resizing a window, make sure the previous mode-line
+ row of the window's current matrix is no longer marked as such. */
+ if (w && matrix == w->current_matrix
+ && matrix->nrows > 0
+ && dim.height != matrix->nrows
+ && matrix->nrows <= matrix->rows_allocated)
+ MATRIX_MODE_LINE_ROW (matrix)->mode_line_p = false;
}
/* 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
Optional fifth argument VISIT, if t or a string, means
set the last-save-file-modtime of buffer to this file's modtime
and mark buffer not modified.
+If VISIT is t, the buffer is marked as visiting FILENAME.
If VISIT is a string, it is a second file name;
the output goes to FILENAME, but the buffer is marked as visiting VISIT.
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
| SWP_FRAMECHANGED);
FRAME_UNDECORATED (f) = false;
}
+
+ f->output_data.w32->dwStyle = GetWindowLong (hwnd, GWL_STYLE);
+
unblock_input ();
}
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
/* Non-hourglass cursor that is currently active. */
HCURSOR current_cursor;
+ /* The window style for this frame. Set up when the frame is
+ created and updated when adding/removing decorations in
+ w32_set_undecorated. Used by w32_set_window_size to adjust the
+ frame's window rectangle. */
DWORD dwStyle;
/* 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)
/* Note: the code below that determines the mode-line/header-line/tab-line
height is essentially the same as that contained in the macro
- CURRENT_{MODE,HEADER}_LINE_HEIGHT, except that it checks whether
- the appropriate glyph row has its `mode_line_p' flag set,
- and if it doesn't, uses estimate_mode_line_height instead. */
+ CURRENT_{MODE,HEADER,TAB}_LINE_HEIGHT, except that it checks whether
+ the appropriate glyph row has its `mode_line_p' flag set, and if
+ it doesn't, uses estimate_mode_line_height instead. */
if (window_wants_mode_line (w))
{
- struct glyph_row *ml_row
- = (w->current_matrix && w->current_matrix->rows
- ? MATRIX_MODE_LINE_ROW (w->current_matrix)
- : 0);
- if (ml_row && ml_row->mode_line_p)
- height -= ml_row->height;
+ if (w->mode_line_height >= 0)
+ height -= w->mode_line_height;
else
- height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w));
+ {
+ struct glyph_row *ml_row
+ = (w->current_matrix && w->current_matrix->rows
+ ? MATRIX_MODE_LINE_ROW (w->current_matrix)
+ : 0);
+ if (ml_row && ml_row->mode_line_p)
+ height -= ml_row->height;
+ else
+ height -= estimate_mode_line_height (f,
+ CURRENT_MODE_LINE_FACE_ID (w));
+ }
}
if (window_wants_tab_line (w))
{
- struct glyph_row *tl_row
- = (w->current_matrix && w->current_matrix->rows
- ? MATRIX_TAB_LINE_ROW (w->current_matrix)
- : 0);
- if (tl_row && tl_row->mode_line_p)
- height -= tl_row->height;
+ if (w->tab_line_height >= 0)
+ height -= w->tab_line_height;
else
- height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID);
+ {
+ struct glyph_row *tl_row
+ = (w->current_matrix && w->current_matrix->rows
+ ? MATRIX_TAB_LINE_ROW (w->current_matrix)
+ : 0);
+ if (tl_row && tl_row->mode_line_p)
+ height -= tl_row->height;
+ else
+ height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID);
+ }
}
if (window_wants_header_line (w))
{
- struct glyph_row *hl_row
- = (w->current_matrix && w->current_matrix->rows
- ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
- : 0);
- if (hl_row && hl_row->mode_line_p)
- height -= hl_row->height;
- else
- height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
+ if (w->header_line_height >= 0)
+ height -= w->header_line_height;
+ {
+ struct glyph_row *hl_row
+ = (w->current_matrix && w->current_matrix->rows
+ ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
+ : 0);
+ if (hl_row && hl_row->mode_line_p)
+ height -= hl_row->height;
+ else
+ height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
+ }
}
/* With a very small font and a mode-line that's taller than