From 35db48b68ab180d8bf1df4722ec0e223bc03d513 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 24 Oct 2019 19:36:19 +0100 Subject: [PATCH] core: fix reg_ignore calculation for window with transparent frame Previously window with transparent frame is mistakenly treated like a completely transparent window. Signed-off-by: Yuxuan Shui --- src/picom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/picom.c b/src/picom.c index 8b5e41b..9bfcc8c 100644 --- a/src/picom.c +++ b/src/picom.c @@ -551,11 +551,13 @@ static struct managed_win *paint_preprocess(session_t *ps, bool *fade_running) { // If the window is solid, we add the window region to the // ignored region // Otherwise last_reg_ignore shouldn't change - if (w->mode == WMODE_SOLID && !ps->o.force_win_blend) { + if (w->mode != WMODE_TRANS && !ps->o.force_win_blend) { + // w->mode == WMODE_SOLID or WMODE_FRAME_TRANS region_t *tmp = rc_region_new(); - if (w->frame_opacity == 1) + if (w->mode == WMODE_SOLID) { *tmp = win_get_bounding_shape_global_by_val(w); - else { + } else { + // w->mode == WMODE_FRAME_TRANS win_get_region_noframe_local(w, tmp); pixman_region32_intersect(tmp, tmp, &w->bounding_shape); pixman_region32_translate(tmp, w->g.x, w->g.y);