From 3e8d4ab0235aba332c8183462de4106795496b20 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 1 May 2016 20:48:59 -0400 Subject: the event loop should own the terminal, not the other way around this way, we should be able to have multiple terminals in the same process --- src/window-xlib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/window-xlib.c') diff --git a/src/window-xlib.c b/src/window-xlib.c index 71eb899..dfa15b9 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -223,7 +223,7 @@ void runes_window_backend_create_window(RunesTerm *t, int argc, char *argv[]) XMapWindow(w->dpy, w->border_w); } -void runes_window_backend_init_loop(RunesTerm *t) +void runes_window_backend_init_loop(RunesTerm *t, RunesLoop *loop) { RunesWindowBackend *w = &t->w; unsigned long xim_mask, common_mask; @@ -247,7 +247,7 @@ void runes_window_backend_init_loop(RunesTerm *t) xim_mask|common_mask|ButtonPressMask|ButtonReleaseMask|PointerMotionMask|ExposureMask); XSetICFocus(w->ic); - runes_loop_start_work(t, runes_window_backend_get_next_event, + runes_loop_start_work(loop, t, runes_window_backend_get_next_event, runes_window_backend_process_event); } @@ -542,7 +542,8 @@ static void runes_window_backend_visual_bell(RunesTerm *t) cairo_surface_flush(cairo_get_target(w->backend_cr)); XFlush(w->dpy); - runes_loop_timer_set(t, 20, 0, runes_window_backend_reset_visual_bell); + runes_loop_timer_set(t->loop, 20, 0, t, + runes_window_backend_reset_visual_bell); } } -- cgit v1.2.3-54-g00ecf