summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2021-02-06 18:22:29 +0100
committerMartin Rudalics <rudalics@gmx.at>2021-02-06 18:22:29 +0100
commit29e9cf291eb35a77ad782e56effddf2fa00ee96c (patch)
tree24af9288415937b1ef1cfef2fa40de7cb8a800ef /src/frame.h
parentc0d504eb7e0922be9f9ec6d9b7f1a27c5fc31b33 (diff)
downloademacs-29e9cf291eb35a77ad782e56effddf2fa00ee96c.tar.gz
Permit zero value for 'child-frame-border-width' parameter (Bug#46184)
* doc/lispref/frames.texi (Layout Parameters): Update entry on 'child-frame-border-width' parameter. * src/frame.c (make_frame): Init child_frame_border_width to -1. (Fframe_child_frame_border_width): Return internal border width if child frame border width parameter is nil. (gui_report_frame_params): Report nil as child frame border width parameter if the frame value is negative. * src/frame.h (FRAME_INTERNAL_BORDER_WIDTH): Return value of child frame border width only if it is not negative. * src/xfns.c (Fx_create_frame): Default child frame border to -1 when recording it in its frame slot via gui_default_parameter. * src/nsfns.m (ns_set_child_frame_border_width): Handle nil ARG. (Fx_create_frame): Default child frame border width parameter to nil. * src/w32fns.c (w32_set_child_frame_border_width): Handle nil ARG. (Fx_create_frame): Default child frame border width parameter to nil. * src/xfns.c (x_set_child_frame_border_width): Handle nil ARG. (Fx_create_frame): Default child frame border width parameter to nil.
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/frame.h b/src/frame.h
index 21148fe94c9..9ddcb4c6810 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1449,11 +1449,11 @@ INLINE int
FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
{
#ifdef HAVE_WINDOW_SYSTEM
- return FRAME_PARENT_FRAME(f)
- ? (f->child_frame_border_width
- ? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
- : frame_dimension (f->internal_border_width))
- : frame_dimension (f->internal_border_width);
+ return (FRAME_PARENT_FRAME(f)
+ ? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0
+ ? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
+ : frame_dimension (f->internal_border_width))
+ : frame_dimension (f->internal_border_width));
#else
return frame_dimension (f->internal_border_width);
#endif