aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2021-05-05 18:36:00 +0200
committerMartin Rudalics2021-05-05 18:36:00 +0200
commite9baa733b8cac00e008cb834abc8712c8c00beed (patch)
tree4c7d95f4cddb8329992516cc540cb214df7a0aaf /src
parent31f64d862b5d4557363363316ef51d3fb0eaca82 (diff)
downloademacs-e9baa733b8cac00e008cb834abc8712c8c00beed.tar.gz
emacs-e9baa733b8cac00e008cb834abc8712c8c00beed.zip
Fix setting of 'width' and 'height' frame parameters
* src/frame.c (Fframe_parameters): Fix bogus setting of 'height' and 'width' parameters.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index d884a6d8b96..738bfe9a5c8 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.
3295 /* It's questionable whether here we should report the value of 3295 /* It's questionable whether here we should report the value of
3296 f->new_height (and f->new_width below) but we've done that in the 3296 f->new_height (and f->new_width below) but we've done that in the
3297 past, so let's keep it. Note that a value of -1 for either of 3297 past, so let's keep it. Note that a value of -1 for either of
3298 these means that no new size was requested. */ 3298 these means that no new size was requested.
3299 height = (f->new_height >= 0 3299
3300 But check f->new_size before to make sure that f->new_height and
3301 f->new_width are not ones requested by adjust_frame_size. */
3302 height = ((f->new_size_p && f->new_height >= 0)
3300 ? f->new_height / FRAME_LINE_HEIGHT (f) 3303 ? f->new_height / FRAME_LINE_HEIGHT (f)
3301 : FRAME_LINES (f)); 3304 : FRAME_LINES (f));
3302 store_in_alist (&alist, Qheight, make_fixnum (height)); 3305 store_in_alist (&alist, Qheight, make_fixnum (height));
3303 width = (f->new_width >= 0 3306 width = ((f->new_size_p && f->new_width >= 0)
3304 ? f->new_width / FRAME_COLUMN_WIDTH (f) 3307 ? f->new_width / FRAME_COLUMN_WIDTH (f)
3305 : FRAME_COLS(f)); 3308 : FRAME_COLS(f));
3306 store_in_alist (&alist, Qwidth, make_fixnum (width)); 3309 store_in_alist (&alist, Qwidth, make_fixnum (width));