diff options
-rw-r--r-- | backend/backend.c | 2 | ||||
-rw-r--r-- | include/wlr/backend.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/backend/backend.c b/backend/backend.c index f93dde38..58181947 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -18,6 +18,7 @@ void wlr_backend_init(struct wlr_backend *backend, const struct wlr_backend_impl *impl) { assert(backend); backend->impl = impl; + wl_signal_init(&backend->events.destroy); wl_signal_init(&backend->events.input_add); wl_signal_init(&backend->events.input_remove); wl_signal_init(&backend->events.output_add); @@ -32,6 +33,7 @@ bool wlr_backend_start(struct wlr_backend *backend) { } void wlr_backend_destroy(struct wlr_backend *backend) { + wl_signal_emit(&backend->events.destroy, backend); if (backend->impl && backend->impl->destroy) { backend->impl->destroy(backend); } else { diff --git a/include/wlr/backend.h b/include/wlr/backend.h index 2c8fd982..4632dcbf 100644 --- a/include/wlr/backend.h +++ b/include/wlr/backend.h @@ -11,6 +11,7 @@ struct wlr_backend { const struct wlr_backend_impl *impl; struct { + struct wl_signal destroy; struct wl_signal input_add; struct wl_signal input_remove; struct wl_signal output_add; |