From 05479840c12174baa8b1de61c80156ee7d56dd38 Mon Sep 17 00:00:00 2001 From: Florian Rommel Date: Sun, 22 May 2022 23:30:52 +0200 Subject: [PATCH] pgtk: Allow child-frame-border-width to be nil * src/pgtkfns.c (pgtk_set_child_frame_border_width, x-create-frame): Allow child-frame-border-width to be set to nil, and set its default value to nil. Copyright-paperwork-exempt: yes --- src/pgtkfns.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 1feb3fe250..0764e4a2d5 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -566,7 +566,14 @@ pgtk_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) static void pgtk_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { - int border = check_int_nonnegative (arg); + int border; + + if (NILP (arg)) + border = -1; + else if (RANGED_FIXNUMP (0, arg, INT_MAX)) + border = XFIXNAT (arg); + else + signal_error ("Invalid child frame border width", arg); if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f)) { @@ -1429,8 +1436,7 @@ This function is an internal primitive--use `make-frame' instead. */ ) } - gui_default_parameter (f, parms, Qchild_frame_border_width, - make_fixnum (0), + gui_default_parameter (f, parms, Qchild_frame_border_width, Qnil, "childFrameBorderWidth", "childFrameBorderWidth", RES_TYPE_NUMBER); gui_default_parameter (f, parms, Qright_divider_width, make_fixnum (0), -- 2.36.1