diff options
| author | Martin Rudalics | 2015-10-07 11:11:53 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2015-10-07 11:11:53 +0200 |
| commit | 391291f4b18b4a1370840de4869797a514a900ae (patch) | |
| tree | 32a62b579eb88e1591293a32ba880e44060975d4 /src | |
| parent | 4d04cee0602bc2238b739da10fd56eae5c23f74b (diff) | |
| download | emacs-391291f4b18b4a1370840de4869797a514a900ae.tar.gz emacs-391291f4b18b4a1370840de4869797a514a900ae.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 6d06e548094..3566f6e6469 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) | |||
| 3971 | /* old_size is the old size of the frame's root window. */ | 3971 | /* old_size is the old size of the frame's root window. */ |
| 3972 | int old_size = horflag ? r->total_cols : r->total_lines; | 3972 | int old_size = horflag ? r->total_cols : r->total_lines; |
| 3973 | int old_pixel_size = horflag ? r->pixel_width : r->pixel_height; | 3973 | int old_pixel_size = horflag ? r->pixel_width : r->pixel_height; |
| 3974 | int old_pixel_top = r->pixel_top; | ||
| 3975 | /* new_size is the new size of the frame's root window. */ | 3974 | /* new_size is the new size of the frame's root window. */ |
| 3976 | int new_size, new_pixel_size; | 3975 | int new_size, new_pixel_size; |
| 3977 | int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f); | 3976 | 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) | |||
| 4001 | new_pixel_size = new_size * unit; | 4000 | new_pixel_size = new_size * unit; |
| 4002 | } | 4001 | } |
| 4003 | 4002 | ||
| 4004 | r->top_line = FRAME_TOP_MARGIN (f); | ||
| 4005 | r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f); | ||
| 4006 | |||
| 4007 | if (new_pixel_size == old_pixel_size | 4003 | if (new_pixel_size == old_pixel_size |
| 4008 | && r->pixel_top == old_pixel_top) | 4004 | && (horflag || r->pixel_top == FRAME_TOP_MARGIN_HEIGHT (f))) |
| 4009 | ; | 4005 | ; |
| 4010 | else if (WINDOW_LEAF_P (r)) | 4006 | else if (WINDOW_LEAF_P (r)) |
| 4011 | /* For a leaf root window just set the size. */ | 4007 | /* 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) | |||
| 4016 | } | 4012 | } |
| 4017 | else | 4013 | else |
| 4018 | { | 4014 | { |
| 4015 | r->top_line = FRAME_TOP_MARGIN (f); | ||
| 4016 | r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f); | ||
| 4017 | |||
| 4019 | r->total_lines = new_size; | 4018 | r->total_lines = new_size; |
| 4020 | r->pixel_height = new_pixel_size; | 4019 | r->pixel_height = new_pixel_size; |
| 4021 | } | 4020 | } |
| @@ -4023,6 +4022,12 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) | |||
| 4023 | { | 4022 | { |
| 4024 | Lisp_Object delta; | 4023 | Lisp_Object delta; |
| 4025 | 4024 | ||
| 4025 | if (!horflag) | ||
| 4026 | { | ||
| 4027 | r->top_line = FRAME_TOP_MARGIN (f); | ||
| 4028 | r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f); | ||
| 4029 | } | ||
| 4030 | |||
| 4026 | if (pixelwise) | 4031 | if (pixelwise) |
| 4027 | XSETINT (delta, new_pixel_size - old_pixel_size); | 4032 | XSETINT (delta, new_pixel_size - old_pixel_size); |
| 4028 | else | 4033 | else |