mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-05 01:40:41 -05:00
render: store frame callback pointer in terminal struct
This allows us to free it when exiting
This commit is contained in:
parent
d7bb83022d
commit
0d24fcafd0
3 changed files with 11 additions and 7 deletions
4
main.c
4
main.c
|
|
@ -496,7 +496,7 @@ main(int argc, char *const *argv)
|
|||
|
||||
if (ret == 0 || !(timeout_ms != -1 && fds[1].revents & POLLIN)) {
|
||||
/* Delayed rendering */
|
||||
if (!term.frame_is_scheduled)
|
||||
if (term.frame_callback == NULL)
|
||||
grid_render(&term);
|
||||
}
|
||||
|
||||
|
|
@ -584,6 +584,8 @@ out:
|
|||
mtx_unlock(&term.kbd.repeat.mutex);
|
||||
|
||||
shm_fini();
|
||||
if (term.frame_callback != NULL)
|
||||
wl_callback_destroy(term.frame_callback);
|
||||
if (term.wl.xdg_toplevel != NULL)
|
||||
xdg_toplevel_destroy(term.wl.xdg_toplevel);
|
||||
if (term.wl.xdg_surface != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue