From ae4478e17f56c1fb52a77d1f034387f154eddef5 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Jul 2017 18:51:19 +1200 Subject: Changed ownership of wlr_session to the multi backend. Currently breaks VT switching for examples. --- backend/multi/backend.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'backend/multi') diff --git a/backend/multi/backend.c b/backend/multi/backend.c index d33d137c..2e8f117c 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include "backend/multi.h" @@ -31,6 +33,8 @@ static void multi_backend_destroy(struct wlr_backend_state *state) { free(sub); } list_free(state->backends); + wlr_session_finish(state->session); + wlr_udev_destroy(state->udev); free(state); } @@ -39,21 +43,26 @@ struct wlr_backend_impl backend_impl = { .destroy = multi_backend_destroy }; -struct wlr_backend *wlr_multi_backend_create() { +struct wlr_backend *wlr_multi_backend_create(struct wlr_session *session, + struct wlr_udev *udev) { struct wlr_backend_state *state = calloc(1, sizeof(struct wlr_backend_state)); if (!state) { wlr_log(L_ERROR, "Backend allocation failed"); return NULL; } + state->backends = list_create(); if (!state->backends) { free(state); wlr_log(L_ERROR, "Backend allocation failed"); return NULL; } + struct wlr_backend *backend = wlr_backend_create(&backend_impl, state); state->backend = backend; + state->session = session; + state->udev = udev; return backend; } -- cgit v1.2.3