diff options
| author | Yuuki Harano | 2021-01-31 00:49:56 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-01-31 00:49:56 +0900 |
| commit | ae18c8ec4f0ef37c8c9cda473770ff47e41291e2 (patch) | |
| tree | 7e3e56e5208b4185f08079e25bf553b7801027bd /src/pgtkfns.c | |
| parent | 50c76b844bc79309b4f5d9e28a2386b9a6f735b7 (diff) | |
| download | emacs-ae18c8ec4f0ef37c8c9cda473770ff47e41291e2.tar.gz emacs-ae18c8ec4f0ef37c8c9cda473770ff47e41291e2.zip | |
Support child frame border width
* src/pgtkfns.c (x_set_child_frame_border_width): Port code for X.
(pgtk_frame_parm_handlers): Add hook.
(Fx_create_frame): Get default parameter.
* src/pgtkterm.c (x_draw_stretch_glyph_string): Re-port code for X.
(pgtk_clear_under_internal_border): Re-port code for X.
Diffstat (limited to 'src/pgtkfns.c')
| -rw-r--r-- | src/pgtkfns.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 620680fbdaa..cee24c1ad12 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c | |||
| @@ -534,6 +534,24 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 534 | 534 | ||
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | static void | ||
| 538 | x_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | ||
| 539 | { | ||
| 540 | int border = check_int_nonnegative (arg); | ||
| 541 | |||
| 542 | if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f)) | ||
| 543 | { | ||
| 544 | f->child_frame_border_width = border; | ||
| 545 | |||
| 546 | if (FRAME_X_WINDOW (f)) | ||
| 547 | { | ||
| 548 | adjust_frame_size (f, -1, -1, 3, false, Qchild_frame_border_width); | ||
| 549 | pgtk_clear_under_internal_border (f); | ||
| 550 | } | ||
| 551 | } | ||
| 552 | |||
| 553 | } | ||
| 554 | |||
| 537 | 555 | ||
| 538 | static void | 556 | static void |
| 539 | x_set_internal_border_width (struct frame *f, Lisp_Object arg, | 557 | x_set_internal_border_width (struct frame *f, Lisp_Object arg, |
| @@ -963,6 +981,7 @@ frame_parm_handler pgtk_frame_parm_handlers[] = { | |||
| 963 | x_set_foreground_color, | 981 | x_set_foreground_color, |
| 964 | x_set_icon_name, | 982 | x_set_icon_name, |
| 965 | x_set_icon_type, | 983 | x_set_icon_type, |
| 984 | x_set_child_frame_border_width, | ||
| 966 | x_set_internal_border_width, /* generic OK */ | 985 | x_set_internal_border_width, /* generic OK */ |
| 967 | gui_set_right_divider_width, | 986 | gui_set_right_divider_width, |
| 968 | gui_set_bottom_divider_width, | 987 | gui_set_bottom_divider_width, |
| @@ -1422,6 +1441,25 @@ This function is an internal primitive--use `make-frame' instead. */ ) | |||
| 1422 | if (!EQ (value, Qunbound)) | 1441 | if (!EQ (value, Qunbound)) |
| 1423 | parms = Fcons (Fcons (Qinternal_border_width, value), parms); | 1442 | parms = Fcons (Fcons (Qinternal_border_width, value), parms); |
| 1424 | } | 1443 | } |
| 1444 | |||
| 1445 | /* Same for child frames. */ | ||
| 1446 | if (NILP (Fassq (Qchild_frame_border_width, parms))) | ||
| 1447 | { | ||
| 1448 | Lisp_Object value; | ||
| 1449 | |||
| 1450 | value = gui_display_get_arg (dpyinfo, parms, Qchild_frame_border_width, | ||
| 1451 | "childFrameBorderWidth", "childFrameBorderWidth", | ||
| 1452 | RES_TYPE_NUMBER); | ||
| 1453 | if (! EQ (value, Qunbound)) | ||
| 1454 | parms = Fcons (Fcons (Qchild_frame_border_width, value), | ||
| 1455 | parms); | ||
| 1456 | |||
| 1457 | } | ||
| 1458 | |||
| 1459 | gui_default_parameter (f, parms, Qchild_frame_border_width, | ||
| 1460 | make_fixnum (0), | ||
| 1461 | "childFrameBorderWidth", "childFrameBorderWidth", | ||
| 1462 | RES_TYPE_NUMBER); | ||
| 1425 | gui_default_parameter (f, parms, Qinternal_border_width, | 1463 | gui_default_parameter (f, parms, Qinternal_border_width, |
| 1426 | make_fixnum (0), | 1464 | make_fixnum (0), |
| 1427 | "internalBorderWidth", "internalBorderWidth", | 1465 | "internalBorderWidth", "internalBorderWidth", |