diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-05-10 16:03:37 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-05-10 16:03:37 -0400 |
commit | 9118ead5ae15548c8a5b96340f9a0a24b3104e32 (patch) | |
tree | 5931f2b6e538cb369e97e2ccfa089615a7415e0a /src/window-xlib.c | |
parent | 082d730944950c202f24d3701878c06cf5e44f5f (diff) | |
download | runes-9118ead5ae15548c8a5b96340f9a0a24b3104e32.tar.gz runes-9118ead5ae15548c8a5b96340f9a0a24b3104e32.zip |
make terms handle cleaning themselves up
Diffstat (limited to 'src/window-xlib.c')
-rw-r--r-- | src/window-xlib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window-xlib.c b/src/window-xlib.c index c41bedf..ecfc6cb 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -237,6 +237,8 @@ void runes_window_backend_create_window(RunesTerm *t, int argc, char *argv[]) XMapWindow(w->dpy, w->w); XMapWindow(w->dpy, w->border_w); + + runes_term_refcnt_inc(t); } void runes_window_backend_init_loop(RunesTerm *t, RunesLoop *loop) @@ -437,7 +439,10 @@ static int runes_window_backend_process_event(void *t) } if (should_close) { + runes_window_backend_cleanup(w); + free(w); runes_pty_backend_request_close(t); + runes_term_refcnt_dec(t); } return !should_close; |