win: release shadow image when shadow is turned off

fix a assertion error when the shadow is turned back on after being
turned off.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-11-18 21:00:40 +00:00
parent db2c9ff0be
commit 896fe20098
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 0 deletions

View File

@ -707,6 +707,7 @@ static void win_set_shadow(session_t *ps, struct managed_win *w, bool shadow_new
// Mark the old extents as damaged if the shadow is removed
if (!w->shadow) {
add_damage(ps, &extents);
win_release_shadow(ps->backend_data, w);
}
pixman_region32_clear(&extents);