[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e9baa73: Fix setting of 'width' and 'height' frame parameters
From: |
Martin Rudalics |
Subject: |
master e9baa73: Fix setting of 'width' and 'height' frame parameters |
Date: |
Wed, 5 May 2021 12:36:27 -0400 (EDT) |
branch: master
commit e9baa733b8cac00e008cb834abc8712c8c00beed
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>
Fix setting of 'width' and 'height' frame parameters
* src/frame.c (Fframe_parameters): Fix bogus setting of 'height'
and 'width' parameters.
---
src/frame.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/frame.c b/src/frame.c
index d884a6d..738bfe9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3295,12 +3295,15 @@ If FRAME is omitted or nil, return information on the
currently selected frame.
/* It's questionable whether here we should report the value of
f->new_height (and f->new_width below) but we've done that in the
past, so let's keep it. Note that a value of -1 for either of
- these means that no new size was requested. */
- height = (f->new_height >= 0
+ these means that no new size was requested.
+
+ But check f->new_size before to make sure that f->new_height and
+ f->new_width are not ones requested by adjust_frame_size. */
+ height = ((f->new_size_p && f->new_height >= 0)
? f->new_height / FRAME_LINE_HEIGHT (f)
: FRAME_LINES (f));
store_in_alist (&alist, Qheight, make_fixnum (height));
- width = (f->new_width >= 0
+ width = ((f->new_size_p && f->new_width >= 0)
? f->new_width / FRAME_COLUMN_WIDTH (f)
: FRAME_COLS(f));
store_in_alist (&alist, Qwidth, make_fixnum (width));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e9baa73: Fix setting of 'width' and 'height' frame parameters,
Martin Rudalics <=