aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkfns.c
diff options
context:
space:
mode:
authorPo Lu2022-05-23 13:30:33 +0800
committerPo Lu2022-05-23 13:30:33 +0800
commitb629cb3f547b5acd6d4ee3574d31b3530f93ff1f (patch)
tree4e79b0c67a52d3da1f6f8c4607495c39c62e5a0f /src/pgtkfns.c
parent5346b67fc27f50abeec3c4f72252a8d9a36f2e6b (diff)
downloademacs-b629cb3f547b5acd6d4ee3574d31b3530f93ff1f.tar.gz
emacs-b629cb3f547b5acd6d4ee3574d31b3530f93ff1f.zip
Minor fixes to PGTK child frames
* src/gtkutil.c (xg_check_special_colors): Handle child frames correctly. * src/pgtkfns.c (pgtk_set_child_frame_border_width): Synchronize code from X. (bug#55588) * src/pgtkmenu.c (pgtk_menu_show, pgtk_dialog_show): Allow in child frames. There are no problems here. * src/pgtkterm.c (pgtk_mouse_position): Clean up coding style.
Diffstat (limited to 'src/pgtkfns.c')
-rw-r--r--src/pgtkfns.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 1feb3fe250d..b26709d90c0 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -566,15 +566,23 @@ pgtk_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
566static void 566static void
567pgtk_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) 567pgtk_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
568{ 568{
569 int border = check_int_nonnegative (arg); 569 int border;
570
571 if (NILP (arg))
572 border = -1;
573 else if (RANGED_FIXNUMP (0, arg, INT_MAX))
574 border = XFIXNAT (arg);
575 else
576 signal_error ("Invalid child frame border width", arg);
570 577
571 if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f)) 578 if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f))
572 { 579 {
573 f->child_frame_border_width = border; 580 f->child_frame_border_width = border;
574 581
575 if (FRAME_X_WINDOW (f)) 582 if (FRAME_GTK_WIDGET (f))
576 { 583 {
577 adjust_frame_size (f, -1, -1, 3, false, Qchild_frame_border_width); 584 adjust_frame_size (f, -1, -1, 3,
585 false, Qchild_frame_border_width);
578 pgtk_clear_under_internal_border (f); 586 pgtk_clear_under_internal_border (f);
579 } 587 }
580 } 588 }