|
|
@ -39,6 +39,8 @@ static void backend_destroy(struct wlr_backend *wlr_backend) {
|
|
|
|
|
|
|
|
|
|
|
|
wlr_signal_emit_safe(&wlr_backend->events.destroy, backend);
|
|
|
|
wlr_signal_emit_safe(&wlr_backend->events.destroy, backend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wl_list_remove(&backend->display_destroy.link);
|
|
|
|
|
|
|
|
|
|
|
|
free(backend);
|
|
|
|
free(backend);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -47,6 +49,12 @@ static const struct wlr_backend_impl backend_impl = {
|
|
|
|
.destroy = backend_destroy,
|
|
|
|
.destroy = backend_destroy,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|
|
|
|
|
|
|
struct wlr_noop_backend *noop =
|
|
|
|
|
|
|
|
wl_container_of(listener, noop, display_destroy);
|
|
|
|
|
|
|
|
backend_destroy(&noop->backend);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_backend *wlr_noop_backend_create(struct wl_display *display) {
|
|
|
|
struct wlr_backend *wlr_noop_backend_create(struct wl_display *display) {
|
|
|
|
wlr_log(WLR_INFO, "Creating noop backend");
|
|
|
|
wlr_log(WLR_INFO, "Creating noop backend");
|
|
|
|
|
|
|
|
|
|
|
@ -60,6 +68,9 @@ struct wlr_backend *wlr_noop_backend_create(struct wl_display *display) {
|
|
|
|
backend->display = display;
|
|
|
|
backend->display = display;
|
|
|
|
wl_list_init(&backend->outputs);
|
|
|
|
wl_list_init(&backend->outputs);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backend->display_destroy.notify = handle_display_destroy;
|
|
|
|
|
|
|
|
wl_display_add_destroy_listener(display, &backend->display_destroy);
|
|
|
|
|
|
|
|
|
|
|
|
return &backend->backend;
|
|
|
|
return &backend->backend;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|