diff options
author | Simon Ser <contact@emersion.fr> | 2023-11-23 14:11:23 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-25 15:05:36 +0000 |
commit | f27808b8d98d5b9907a347cd9f01bb7bef3218b9 (patch) | |
tree | f9f7bf7a8c55256f78b0b48558354dc6c8e29bb8 /backend/multi | |
parent | 54f9944b4885e4a08c0f004136ef06f732b8308f (diff) |
backend/multi: take wl_event_loop instead of wl_display
Diffstat (limited to 'backend/multi')
-rw-r--r-- | backend/multi/backend.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c index df74fbb1..dc2668bb 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -48,7 +48,7 @@ static void subbackend_state_destroy(struct subbackend_state *sub) { static void multi_backend_destroy(struct wlr_backend *wlr_backend) { struct wlr_multi_backend *backend = multi_backend_from_backend(wlr_backend); - wl_list_remove(&backend->display_destroy.link); + wl_list_remove(&backend->event_loop_destroy.link); wlr_backend_finish(wlr_backend); @@ -105,13 +105,13 @@ static const struct wlr_backend_impl backend_impl = { .get_buffer_caps = multi_backend_get_buffer_caps, }; -static void handle_display_destroy(struct wl_listener *listener, void *data) { +static void handle_event_loop_destroy(struct wl_listener *listener, void *data) { struct wlr_multi_backend *backend = - wl_container_of(listener, backend, display_destroy); + wl_container_of(listener, backend, event_loop_destroy); multi_backend_destroy((struct wlr_backend*)backend); } -struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) { +struct wlr_backend *wlr_multi_backend_create(struct wl_event_loop *loop) { struct wlr_multi_backend *backend = calloc(1, sizeof(*backend)); if (!backend) { wlr_log(WLR_ERROR, "Backend allocation failed"); @@ -124,8 +124,8 @@ struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) { wl_signal_init(&backend->events.backend_add); wl_signal_init(&backend->events.backend_remove); - backend->display_destroy.notify = handle_display_destroy; - wl_display_add_destroy_listener(display, &backend->display_destroy); + backend->event_loop_destroy.notify = handle_event_loop_destroy; + wl_event_loop_add_destroy_listener(loop, &backend->event_loop_destroy); return &backend->backend; } |