mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-18 06:46:23 -04:00
config: add tweak.transparent_fullscreen=no|yes option
When enabled, the alpha channel will not be disabled when in fullscreen state Defaults to `no`
This commit is contained in:
parent
f3d848da01
commit
e41fafd985
4 changed files with 11 additions and 3 deletions
4
config.c
4
config.c
|
|
@ -2569,6 +2569,9 @@ parse_section_tweak(struct context *ctx)
|
|||
else if (streq(key, "bold-text-in-bright-amount"))
|
||||
return value_to_float(ctx, &conf->bold_in_bright.amount);
|
||||
|
||||
else if (strcmp(key, "transparent_fullscreen") == 0)
|
||||
return value_to_bool(ctx, &conf->tweak.transparent_fullscreen);
|
||||
|
||||
else {
|
||||
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
|
||||
return false;
|
||||
|
|
@ -3158,6 +3161,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.box_drawing_solid_shades = true,
|
||||
.font_monospace_warn = true,
|
||||
.sixel = true,
|
||||
.transparent_fullscreen = false,
|
||||
},
|
||||
|
||||
.touch = {
|
||||
|
|
|
|||
1
config.h
1
config.h
|
|
@ -368,6 +368,7 @@ struct config {
|
|||
bool box_drawing_solid_shades;
|
||||
bool font_monospace_warn;
|
||||
bool sixel;
|
||||
bool transparent_fullscreen;
|
||||
} tweak;
|
||||
|
||||
struct {
|
||||
|
|
|
|||
|
|
@ -1507,6 +1507,10 @@ any of these options.
|
|||
*bold-text-in-bright* is set to *yes* (the *palette-based* variant
|
||||
is not affected by this option). Default: _1.3_.
|
||||
|
||||
*transparent_fullscreen*
|
||||
Boolean. When enabled, foot will not disable the alpha channel when
|
||||
in fullscreen state. Default: _no_
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
*foot*(1), *footclient*(1)
|
||||
|
|
|
|||
5
render.c
5
render.c
|
|
@ -538,7 +538,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_region32_t *damag
|
|||
}
|
||||
|
||||
else if (cell->attrs.bg_src == COLOR_DEFAULT) {
|
||||
if (term->window->is_fullscreen) {
|
||||
if (term->window->is_fullscreen && !term->conf->tweak.transparent_fullscreen) {
|
||||
/*
|
||||
* Note: disable transparency when fullscreened.
|
||||
*
|
||||
|
|
@ -2900,8 +2900,7 @@ grid_render(struct terminal *term)
|
|||
xassert(term->height > 0);
|
||||
|
||||
struct buffer_chain *chain = term->render.chains.grid;
|
||||
bool use_alpha = !term->window->is_fullscreen &&
|
||||
term->colors.alpha != 0xffff;
|
||||
bool use_alpha = term->colors.alpha != 0xffff;
|
||||
struct buffer *buf = shm_get_buffer(
|
||||
chain, term->width, term->height, use_alpha);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue