aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/render.c b/render.c
index fdf7015c..b0d21d18 100644
--- a/render.c
+++ b/render.c
@@ -744,7 +744,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
_bg = swap;
}
- if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
+ else if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
switch (term->conf->colors.alpha_mode) {
case ALPHA_MODE_DEFAULT: {
if (cell->attrs.bg_src == COLOR_DEFAULT) {
@@ -754,8 +754,15 @@ render_cell(struct terminal *term, pixman_image_t *pix,
}
case ALPHA_MODE_MATCHING: {
- if (cell->attrs.bg == term->colors.bg)
+ if (cell->attrs.bg_src == COLOR_DEFAULT ||
+ ((cell->attrs.bg_src == COLOR_BASE16 ||
+ cell->attrs.bg_src == COLOR_BASE256) &&
+ term->colors.table[cell->attrs.bg] == term->colors.bg) ||
+ (cell->attrs.bg_src == COLOR_RGB &&
+ cell->attrs.bg == term->colors.bg))
+ {
alpha = term->colors.alpha;
+ }
break;
}