[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 391291f: In resize_frame_windows don't set a top po
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master 391291f: In resize_frame_windows don't set a top position when resizing horizontally. |
Date: |
Wed, 07 Oct 2015 09:12:42 +0000 |
branch: master
commit 391291f4b18b4a1370840de4869797a514a900ae
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
In resize_frame_windows don't set a top position when resizing horizontally.
* src/window.c (resize_frame_windows): Don't set root window's
top position when resizing horizontally.
---
src/window.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/window.c b/src/window.c
index 6d06e54..3566f6e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3971,7 +3971,6 @@ resize_frame_windows (struct frame *f, int size, bool
horflag, bool pixelwise)
/* old_size is the old size of the frame's root window. */
int old_size = horflag ? r->total_cols : r->total_lines;
int old_pixel_size = horflag ? r->pixel_width : r->pixel_height;
- int old_pixel_top = r->pixel_top;
/* new_size is the new size of the frame's root window. */
int new_size, new_pixel_size;
int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f);
@@ -4001,11 +4000,8 @@ resize_frame_windows (struct frame *f, int size, bool
horflag, bool pixelwise)
new_pixel_size = new_size * unit;
}
- r->top_line = FRAME_TOP_MARGIN (f);
- r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
-
if (new_pixel_size == old_pixel_size
- && r->pixel_top == old_pixel_top)
+ && (horflag || r->pixel_top == FRAME_TOP_MARGIN_HEIGHT (f)))
;
else if (WINDOW_LEAF_P (r))
/* For a leaf root window just set the size. */
@@ -4016,6 +4012,9 @@ resize_frame_windows (struct frame *f, int size, bool
horflag, bool pixelwise)
}
else
{
+ r->top_line = FRAME_TOP_MARGIN (f);
+ r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
+
r->total_lines = new_size;
r->pixel_height = new_pixel_size;
}
@@ -4023,6 +4022,12 @@ resize_frame_windows (struct frame *f, int size, bool
horflag, bool pixelwise)
{
Lisp_Object delta;
+ if (!horflag)
+ {
+ r->top_line = FRAME_TOP_MARGIN (f);
+ r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
+ }
+
if (pixelwise)
XSETINT (delta, new_pixel_size - old_pixel_size);
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 391291f: In resize_frame_windows don't set a top position when resizing horizontally.,
Martin Rudalics <=