backend: add wlr_backend.event_loop

Many objects depending on wlr_backend need access to the event
loop. Storing it here will simplify wlr_output when combined
with [1], and will allow wlr_renderer_autocreate() to have access
to the event loop.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310
This commit is contained in:
Simon Ser 2023-08-21 16:34:13 +02:00
parent d3a339a03e
commit 3b3640dda4
9 changed files with 10 additions and 8 deletions

View file

@ -39,9 +39,10 @@
#define WAIT_SESSION_TIMEOUT 10000 // ms
void wlr_backend_init(struct wlr_backend *backend,
const struct wlr_backend_impl *impl) {
const struct wlr_backend_impl *impl, struct wl_event_loop *loop) {
*backend = (struct wlr_backend){
.impl = impl,
.event_loop = loop,
};
wl_signal_init(&backend->events.destroy);
wl_signal_init(&backend->events.new_input);