aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-09 07:23:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-09 07:23:32 +0000
commit0d24fcafd0f12908b40b82986bc26db2762daf6f (patch)
tree3e3c3b4e6307d614c49036a6b8a3e7b897aaf489 /main.c
parentcleanup (diff)
render: store frame callback pointer in terminal struct
This allows us to free it when exiting
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 74a28c1c..8efade1a 100644
--- a/main.c
+++ b/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)