diff --git a/src/compton.c b/src/compton.c index 684e40e6..b861f036 100644 --- a/src/compton.c +++ b/src/compton.c @@ -487,7 +487,7 @@ static win *paint_preprocess(session_t *ps, bool *fade_running) { rc_region_t *last_reg_ignore = rc_region_new(); bool unredir_possible = false; - // Trace whether it's the highest window to paint + // Track whether it's the highest window to paint bool is_highest = true; bool reg_ignore_valid = true; for (win *w = ps->list; w; w = next) { @@ -500,8 +500,9 @@ static win *paint_preprocess(session_t *ps, bool *fade_running) { next = w->next; // Destroy reg_ignore if some window above us invalidated it - if (!reg_ignore_valid) + if (!reg_ignore_valid) { rc_region_unref(&w->reg_ignore); + } // log_trace("%d %d %s", w->a.map_state, w->ever_damaged, w->name); diff --git a/src/win.c b/src/win.c index a0360c50..585e9c6c 100644 --- a/src/win.c +++ b/src/win.c @@ -1438,8 +1438,7 @@ static void finish_destroy_win(session_t *ps, win **_w) { // be true, and there is no need to invalid w->next->reg_ignore // when w is destroyed. if (w->next) { - // should be `= w->reg_ignore_valid && w->next->reg_ignore_valid`, - // but keep it this way until we think about reg_ignore. + rc_region_unref(&w->next->reg_ignore); w->next->reg_ignore_valid = false; }