mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
wayland: explicitly purge all SHM pixmaps when destroying window
All SHM pixmap cookies depend on the terminal instance’s memory address. Thus, after a terminal instance has been destroyed, shm pixmaps that belonged to it will never be purged automatically.
This commit is contained in:
parent
b5950d9b27
commit
a9872aac5a
1 changed files with 8 additions and 0 deletions
|
|
@ -1475,6 +1475,14 @@ wayl_win_destroy(struct wl_window *win)
|
|||
wayl_win_subsurface_destroy(&win->scrollback_indicator);
|
||||
wayl_win_subsurface_destroy(&win->render_timer);
|
||||
|
||||
shm_purge(shm, shm_cookie_search(term));
|
||||
shm_purge(shm, shm_cookie_scrollback_indicator(term));
|
||||
shm_purge(shm, shm_cookie_render_timer(term));
|
||||
shm_purge(shm, shm_cookie_grid(term));
|
||||
|
||||
for (size_t i = 0; i < ALEN(win->csd.surface); i++)
|
||||
shm_purge(shm, shm_cookie_csd(term, i));
|
||||
|
||||
#if defined(HAVE_XDG_ACTIVATION)
|
||||
if (win->xdg_activation_token != NULL)
|
||||
xdg_activation_token_v1_destroy(win->xdg_activation_token);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue