diff options
| author | Garklein | 2025-07-26 10:07:07 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2025-07-26 18:02:18 +0300 |
| commit | 1bc338075db0bb9e498d24524825b6708b5d78f6 (patch) | |
| tree | ab60e73bf45bdd0bc4779a99a2e5b34ac02eeca3 /src/pgtkfns.c | |
| parent | aa2a83d7831261d6dfce74b139daa2a84319fc96 (diff) | |
| download | emacs-1bc338075db0bb9e498d24524825b6708b5d78f6.tar.gz emacs-1bc338075db0bb9e498d24524825b6708b5d78f6.zip | |
Add frame parameter which allows border transparency
The new 'borders-respect-alpha-background' frame parameter, when
set to 't', will make window dividers and internal borders
respect the 'alpha-background' frame parameter. This allows
transparent gaps between windows.
* doc/lispref/frames.texi (Font and Color Parameters):
Document the change.
* src/frame.c (frame_parm_table, syms_of_frame)
(gui_set_borders_respect_alpha_background):
* src/frame.h (struct frame): Add frame parameter.
* src/androidfns.c (x_create_frame, android_create_tip_frame)
(android_frame_parm_handlers):
* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame)
(haiku_frame_parm_handlers):
* src/nsfns.m (ns_frame_parm_handlers, x_create_frame):
* src/w32fns.c (x_create_frame, w32_create_tip_frame)
(w32_frame_parm_handlers): Add dummy parameters for backends
that don't support opacity.
* src/pgtkfns.c (pgtk_frame_parm_handlers, x_create_frame)
(pgtk_create_tip_frame):
* src/pgtkterm.c (pgtk_draw_window_divider):
* src/xfns.c (x_create_frame, x_create_tip_frame)
(x_frame_parm_handlers)
* src/xterm.c (x_draw_window_divider)
(x_clear_under_internal_border): Implement parameter on backends
that support opacity.
Diffstat (limited to 'src/pgtkfns.c')
| -rw-r--r-- | src/pgtkfns.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c index b55728b579c..917c9e7ab67 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c | |||
| @@ -985,6 +985,7 @@ frame_parm_handler pgtk_frame_parm_handlers[] = | |||
| 985 | pgtk_set_override_redirect, | 985 | pgtk_set_override_redirect, |
| 986 | gui_set_no_special_glyphs, | 986 | gui_set_no_special_glyphs, |
| 987 | pgtk_set_alpha_background, | 987 | pgtk_set_alpha_background, |
| 988 | gui_set_borders_respect_alpha_background, | ||
| 988 | NULL, | 989 | NULL, |
| 989 | }; | 990 | }; |
| 990 | 991 | ||
| @@ -1571,6 +1572,9 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1, 1, 0, | |||
| 1571 | "alpha", "Alpha", RES_TYPE_NUMBER); | 1572 | "alpha", "Alpha", RES_TYPE_NUMBER); |
| 1572 | gui_default_parameter (f, parms, Qalpha_background, Qnil, | 1573 | gui_default_parameter (f, parms, Qalpha_background, Qnil, |
| 1573 | "alphaBackground", "AlphaBackground", RES_TYPE_NUMBER); | 1574 | "alphaBackground", "AlphaBackground", RES_TYPE_NUMBER); |
| 1575 | gui_default_parameter (f, parms, Qborders_respect_alpha_background, Qnil, | ||
| 1576 | "bordersRespectAlphaBackground", | ||
| 1577 | "BordersRespectAlphaBackground", RES_TYPE_NUMBER); | ||
| 1574 | 1578 | ||
| 1575 | if (!NILP (parent_frame)) | 1579 | if (!NILP (parent_frame)) |
| 1576 | { | 1580 | { |
| @@ -2730,6 +2734,9 @@ pgtk_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, str | |||
| 2730 | "alpha", "Alpha", RES_TYPE_NUMBER); | 2734 | "alpha", "Alpha", RES_TYPE_NUMBER); |
| 2731 | gui_default_parameter (f, parms, Qalpha_background, Qnil, | 2735 | gui_default_parameter (f, parms, Qalpha_background, Qnil, |
| 2732 | "alphaBackground", "AlphaBackground", RES_TYPE_NUMBER); | 2736 | "alphaBackground", "AlphaBackground", RES_TYPE_NUMBER); |
| 2737 | gui_default_parameter (f, parms, Qborders_respect_alpha_background, Qnil, | ||
| 2738 | "bordersRespectAlphaBackground", | ||
| 2739 | "BordersRespectAlphaBackground", RES_TYPE_NUMBER); | ||
| 2733 | 2740 | ||
| 2734 | /* Add `tooltip' frame parameter's default value. */ | 2741 | /* Add `tooltip' frame parameter's default value. */ |
| 2735 | if (NILP (Fframe_parameter (frame, Qtooltip))) | 2742 | if (NILP (Fframe_parameter (frame, Qtooltip))) |