aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-xlib.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-01 20:48:59 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-01 20:48:59 -0400
commit3e8d4ab0235aba332c8183462de4106795496b20 (patch)
tree87f2feb164c1aaab777ff10e60bb99781f3e434b /src/window-xlib.c
parenta7d1e85a0b13b7a6f4d8a7be69410da2cc7d4d03 (diff)
downloadrunes-3e8d4ab0235aba332c8183462de4106795496b20.tar.gz
runes-3e8d4ab0235aba332c8183462de4106795496b20.zip
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
Diffstat (limited to 'src/window-xlib.c')
-rw-r--r--src/window-xlib.c7
1 files changed, 4 insertions, 3 deletions
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);
}
}