diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-11 08:01:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-11 08:01:22 +0000 |
| commit | a9872aac5af98ac5a643304b062aa984c4642f97 (patch) | |
| tree | c13ae2ae57d6054a9e58a924586e731478ba1489 | |
| parent | wayland: purge CSD pixmaps when destroying the CSDs (diff) | |
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.
| -rw-r--r-- | wayland.c | 8 |
1 files changed, 8 insertions, 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); |
