]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix display of internal border in child frames on pgtk
authorPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 02:16:06 +0000 (10:16 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 02:16:56 +0000 (10:16 +0800)
* 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
src/pgtkterm.c

index 5d596861b8f62fca9a1fe3718ab46b9c51014c47..e94c2dfb30fa6c0e2d2937afc79bc8ac439ff3e6 100644 (file)
@@ -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),
index 3093083a82c84255eb65a212bae5b15236f20e3c..736fce09c4a780699b869587e39ec0ce45b299a4 100644 (file)
@@ -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);