mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
wayland: purge CSD pixmaps when destroying the CSDs
CSDs aren’t typically toggled on and off. Thus, when disabled, immediately purge their corresponding pixmap buffers, to free up some memory, and release file descriptors.
This commit is contained in:
parent
0a6e7e6167
commit
b5950d9b27
1 changed files with 6 additions and 1 deletions
|
|
@ -51,8 +51,13 @@ csd_instantiate(struct wl_window *win)
|
|||
static void
|
||||
csd_destroy(struct wl_window *win)
|
||||
{
|
||||
for (size_t i = 0; i < ALEN(win->csd.surface); i++)
|
||||
struct terminal *term = win->term;
|
||||
struct wl_shm *shm = term->wl->shm;
|
||||
|
||||
for (size_t i = 0; i < ALEN(win->csd.surface); i++) {
|
||||
wayl_win_subsurface_destroy(&win->csd.surface[i]);
|
||||
shm_purge(shm, shm_cookie_csd(term, i));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue