win: fix leak of damaged regions of windows

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-04-08 07:52:37 +01:00
parent e3e73d7fc1
commit be78557dae
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 1 additions and 1 deletions

View File

@ -1568,6 +1568,7 @@ void free_win_res(session_t *ps, struct managed_win *w) {
// Above should be done during unmapping
// Except when we are called by session_destroy
pixman_region32_fini(&w->damaged);
pixman_region32_fini(&w->bounding_shape);
// BadDamage may be thrown if the window is destroyed
set_ignore_cookie(&ps->c, xcb_damage_destroy(ps->c.c, w->damage));
@ -2180,7 +2181,6 @@ void destroy_win_finish(session_t *ps, struct win *w) {
w2->prev_trans = NULL;
}
}
pixman_region32_fini(&mw->damaged);
}
free(w);