aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorFazzi <faaris.ansari@proton.me>2023-10-09 17:47:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-04-14 14:47:45 +0000
commit5f83278afd0530c323d4192e1095b3d1dea644c9 (patch)
tree90be5a46f4e652c83df51f2a36b987895269d69a /render.c
parentdoc: foot.ini: workers: "if you have a ridiculous number of cores" (diff)
config: add alpha_mode option
Diffstat (limited to 'render.c')
-rw-r--r--render.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/render.c b/render.c
index d2202468..2766e5ee 100644
--- a/render.c
+++ b/render.c
@@ -788,6 +788,27 @@ render_cell(struct terminal *term, pixman_image_t *pix,
alpha = term->colors.alpha;
}
}
+
+ if (!term->window->is_fullscreen) {
+ switch (term->conf->alpha_mode) {
+ case ALPHA_MODE_DEFAULT: {
+ if (cell->attrs.bg_src == COLOR_DEFAULT) {
+ alpha = term->colors.alpha;
+ }
+ break;
+ }
+ case ALPHA_MODE_MATCHING: {
+ if (cell->attrs.bg == term->colors.bg) {
+ alpha = term->colors.alpha;
+ }
+ break;
+ }
+ case ALPHA_MODE_ALL: {
+ alpha = term->colors.alpha;
+ break;
+ }
+ }
+ }
}
if (unlikely(is_selected && _fg == _bg)) {