[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d68e849: Handle top margin change in adjust_frame_s
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master d68e849: Handle top margin change in adjust_frame_size |
Date: |
Wed, 16 Oct 2019 05:03:47 -0400 (EDT) |
branch: master
commit d68e8495e032890fbfd31935b9f660400641f1d9
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Handle top margin change in adjust_frame_size
* src/frame.c (adjust_frame_size): Handle case where only
pseudo windows changed height so the top margin has to be
adjusted.
* src/window.c (Fset_window_configuration): Call
adjust_frame_size with inhibit 4.
---
src/frame.c | 11 +++++------
src/window.c | 7 ++++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/frame.c b/src/frame.c
index cc76cf4..8ca5106 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -704,18 +704,17 @@ adjust_frame_size (struct frame *f, int new_width, int
new_height, int inhibit,
inhibit_vertical ? Qt : Qnil));
if (FRAME_TERMINAL (f)->set_window_size_hook)
- FRAME_TERMINAL (f)->set_window_size_hook (f,
- 0,
- new_text_width,
- new_text_height,
- 1);
+ FRAME_TERMINAL (f)->set_window_size_hook
+ (f, 0, new_text_width, new_text_height, 1);
f->resized_p = true;
return;
}
#endif
- if (new_text_width == old_text_width
+ if ((XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top
+ == FRAME_TOP_MARGIN_HEIGHT (f))
+ && new_text_width == old_text_width
&& new_text_height == old_text_height
&& new_windows_width == old_windows_width
&& new_windows_height == old_windows_height
diff --git a/src/window.c b/src/window.c
index ba9af3b..1e6e148 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7129,10 +7129,11 @@ the return value is nil. Otherwise the value is t. */)
if (NILP (leaf_windows[i]->contents))
free_window_matrices (leaf_windows[i]);
- /* Allow set_window_size_hook again and apply frame size changes
- if needed. */
+ /* Allow set_window_size_hook again and resize frame's windows
+ if necessary. But change frame size only to preserve window
+ minimum sizes. */
f->can_set_window_size = true;
- adjust_frame_size (f, -1, -1, 1, false, Qset_window_configuration);
+ adjust_frame_size (f, -1, -1, 4, false, Qset_window_configuration);
adjust_frame_glyphs (f);
unblock_input ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d68e849: Handle top margin change in adjust_frame_size,
Martin Rudalics <=