[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/tty-child-frames 6aa203bb04f 06/10: Minor refactoring
From: |
Gerd Moellmann |
Subject: |
scratch/tty-child-frames 6aa203bb04f 06/10: Minor refactoring |
Date: |
Tue, 22 Oct 2024 00:43:41 -0400 (EDT) |
branch: scratch/tty-child-frames
commit 6aa203bb04fa75e7562064e9261d7760c1b6562a
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Minor refactoring
---
src/frame.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/frame.c b/src/frame.c
index 5f07f8e8976..69ffc53ebbf 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1435,23 +1435,23 @@ tty_child_size_param (struct frame *child, Lisp_Object
key,
}
else if (FLOATP (val))
{
- /* Width and height may be a float, in which case
- it's a multiple of the parent's value. */
- struct frame *parent = FRAME_PARENT_FRAME (child);
- int sz = (EQ (key, Qwidth) ? FRAME_TOTAL_COLS (parent)
- : FRAME_TOTAL_LINES (parent));
- val = make_fixnum (XFLOAT_DATA (val) * sz);
+ /* Width and height may be a float, in which case
+ it's a multiple of the parent's value. */
+ struct frame *parent = FRAME_PARENT_FRAME (child);
+ int sz = (EQ (key, Qwidth) ? FRAME_TOTAL_COLS (parent)
+ : FRAME_TOTAL_LINES (parent));
+ val = make_fixnum (XFLOAT_DATA (val) * sz);
}
- if (FIXNUMP (val) && XFIXNUM (val) >= 0)
+ if (FIXNATP (val))
return XFIXNUM (val);
}
return dflt;
}
static void
-child_frame_rect (struct frame *f, Lisp_Object params,
- int *x, int *y, int *w, int *h)
+tty_child_frame_rect (struct frame *f, Lisp_Object params,
+ int *x, int *y, int *w, int *h)
{
*x = tty_child_pos_param (f, Qleft, params, 0);
*y = tty_child_pos_param (f, Qtop, params, 0);
@@ -1585,7 +1585,7 @@ affects all frames on the same terminal device. */)
terminal size). */
int x = 0, y = 0, width, height;
if (FRAME_PARENT_FRAME (f))
- child_frame_rect (f, parms, &x, &y, &width, &height);
+ tty_child_frame_rect (f, parms, &x, &y, &width, &height);
else
get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
adjust_frame_size (f, width, height - FRAME_TOP_MARGIN (f), 5, 0,
- branch scratch/tty-child-frames created (now 55af24a1c29), Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 5445062fabc 02/10: Check for tty-child-frames feature in show-paren, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 0012e555d96 07/10: Don't set internal_last_event_frame to nil, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 4a3ba42e6f8 08/10: Comment, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 23409041b13 05/10: Accept frame param width/height of 0, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames fbe63a33f1a 09/10: Comment, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 55b72ad8755 03/10: Set top terminal frame also to children, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 55af24a1c29 10/10: Don't ignore .patch files, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames 6aa203bb04f 06/10: Minor refactoring,
Gerd Moellmann <=
- scratch/tty-child-frames 414de92a562 01/10: Initial child frames based on master, Gerd Moellmann, 2024/10/22
- scratch/tty-child-frames e0ca1256a57 04/10: Don't check for child frame support, Gerd Moellmann, 2024/10/22