diff --git a/config.c b/config.c index b7bc1f09..51fa5b87 100644 --- a/config.c +++ b/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 = { diff --git a/config.h b/config.h index 4ce36486..1b82f7af 100644 --- a/config.h +++ b/config.h @@ -368,6 +368,7 @@ struct config { bool box_drawing_solid_shades; bool font_monospace_warn; bool sixel; + bool transparent_fullscreen; } tweak; struct { diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index b9e1e70e..068856eb 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -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) diff --git a/render.c b/render.c index fd7e743a..bb1b0865 100644 --- a/render.c +++ b/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);