aboutsummaryrefslogtreecommitdiff
path: root/backend/multi
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-20 05:54:41 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-20 05:54:41 -0500
commit6c8fd6017e92441e8b1702958f34fd9d88e32928 (patch)
treed04a2e7cf75a882fd2c396350b11f80c30b0339c /backend/multi
parentee39dff1e7de4a234f2ff39c1ce2df6bc84abb04 (diff)
backend add and remove events
Diffstat (limited to 'backend/multi')
-rw-r--r--backend/multi/backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index c000342b..0dd3c54b 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -79,6 +79,9 @@ struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) {
wl_list_init(&backend->backends);
wlr_backend_init(&backend->backend, &backend_impl);
+ wl_signal_init(&backend->events.backend_add);
+ wl_signal_init(&backend->events.backend_remove);
+
return &backend->backend;
}
@@ -162,6 +165,8 @@ void wlr_multi_backend_add(struct wlr_backend *_multi,
wl_signal_add(&backend->events.output_remove, &sub->output_remove);
sub->output_remove.notify = output_remove_reemit;
+
+ wl_signal_emit(&multi->events.backend_add, backend);
}
void wlr_multi_backend_remove(struct wlr_backend *_multi,
@@ -173,6 +178,7 @@ void wlr_multi_backend_remove(struct wlr_backend *_multi,
multi_backend_get_subbackend(multi, backend);
if (sub) {
+ wl_signal_emit(&multi->events.backend_remove, backend);
subbackend_state_destroy(sub);
}
}