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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-10-24 19:36:19 +01:00
parent a0712274ff
commit 35db48b68a
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 5 additions and 3 deletions

View File

@ -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);