From dd10ec4fd13cc11c5188fd76a3852e0eea294ee8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 23 Apr 1996 15:20:52 +0000 Subject: [PATCH] (Fframe_parameters, both definitions): Get sizes from FRAME_NEW_HEIGHT, FRAME_NEW_WIDTH if they are nonzero. --- src/frame.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/frame.c b/src/frame.c index d9656c37fad..6291147ae73 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1699,6 +1699,7 @@ If FRAME is omitted, return information on the currently selected frame.") { Lisp_Object alist; FRAME_PTR f; + int height, width; if (EQ (frame, Qnil)) f = selected_frame; @@ -1713,8 +1714,10 @@ If FRAME is omitted, return information on the currently selected frame.") alist = Fcopy_alist (f->param_alist); store_in_alist (&alist, Qname, f->name); - store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); - store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); + height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); + store_in_alist (&alist, Qheight, make_number (height)); + width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); + store_in_alist (&alist, Qwidth, make_number (width)); store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); store_in_alist (&alist, Qminibuffer, (! FRAME_HAS_MINIBUF_P (f) ? Qnil @@ -2339,6 +2342,7 @@ DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, { Lisp_Object alist; FRAME_PTR f; + int height, width; if (EQ (frame, Qnil)) f = selected_frame; @@ -2369,8 +2373,10 @@ DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, #endif store_in_alist (&alist, intern ("font"), build_string ("default")); store_in_alist (&alist, Qname, build_string ("emacs")); - store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); - store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); + height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); + store_in_alist (&alist, Qheight, make_number (height)); + width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); + store_in_alist (&alist, Qwidth, make_number (width)); store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); -- 2.39.2