From a7dbbcac571ebf07ec89a09cc8d9bc4fdf2ae063 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 5 Jan 2022 10:16:06 +0800 Subject: [PATCH] Fix display of internal border in child frames on pgtk * src/pgtkfns.c (Fx_create_frame): Fix child frame border resource names. * src/pgtkterm.c (pgtk_clear_under_internal_border): Fix test for child frames. (bug#53018) --- src/pgtkfns.c | 14 ++++++-------- src/pgtkterm.c | 3 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 5d596861b8f..e94c2dfb30f 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -1454,9 +1454,6 @@ This function is an internal primitive--use `make-frame' instead. */ ) gui_default_parameter (f, parms, Qborder_width, make_fixnum (0), "borderWidth", "BorderWidth", RES_TYPE_NUMBER); - /* This defaults to 1 in order to match xterm. We recognize either - internalBorderWidth or internalBorder (which is what xterm calls - it). */ if (NILP (Fassq (Qinternal_border_width, parms))) { Lisp_Object value; @@ -1468,13 +1465,18 @@ This function is an internal primitive--use `make-frame' instead. */ ) parms = Fcons (Fcons (Qinternal_border_width, value), parms); } + gui_default_parameter (f, parms, Qinternal_border_width, + make_fixnum (0), + "internalBorderWidth", "internalBorderWidth", + RES_TYPE_NUMBER); + /* Same for child frames. */ if (NILP (Fassq (Qchild_frame_border_width, parms))) { Lisp_Object value; value = gui_display_get_arg (dpyinfo, parms, Qchild_frame_border_width, - "childFrameBorderWidth", "childFrameBorderWidth", + "childFrameBorder", "childFrameBorder", RES_TYPE_NUMBER); if (! EQ (value, Qunbound)) parms = Fcons (Fcons (Qchild_frame_border_width, value), @@ -1486,10 +1488,6 @@ This function is an internal primitive--use `make-frame' instead. */ ) make_fixnum (0), "childFrameBorderWidth", "childFrameBorderWidth", RES_TYPE_NUMBER); - gui_default_parameter (f, parms, Qinternal_border_width, - make_fixnum (0), - "internalBorderWidth", "internalBorderWidth", - RES_TYPE_NUMBER); gui_default_parameter (f, parms, Qright_divider_width, make_fixnum (0), NULL, NULL, RES_TYPE_NUMBER); gui_default_parameter (f, parms, Qbottom_divider_width, make_fixnum (0), diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 3093083a82c..736fce09c4a 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -4957,7 +4957,8 @@ void pgtk_clear_under_internal_border (struct frame *f) { if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0 - && gtk_widget_get_realized (FRAME_GTK_OUTER_WIDGET (f))) + && (!FRAME_GTK_OUTER_WIDGET (f) + || gtk_widget_get_realized (FRAME_GTK_OUTER_WIDGET (f)))) { int border = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); -- 2.39.5