decouples outputenable state and wl_output global

This decouples wlr_output_enable and the wl_global.
The previously internal functions wlr_output_(destroy/create)_global are
exposed and used automatically in the wlr_output_layout to create/tear
down the global.
The compositor can handle them itself if it wants to, but I think this
is the right moment to create/destroy the wl_output when the
wlr_output_layout is used.
This commit is contained in:
Markus Ongyerth 2018-01-23 17:40:12 +01:00
parent 03440bbd83
commit 3cf7225cec
8 changed files with 14 additions and 25 deletions

View file

@ -326,7 +326,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
}
wl_list_insert(&backend->outputs, &output->link);
wlr_output_update_enabled(wlr_output, true);
wlr_output->enabled = true;
wl_signal_emit(&backend->backend.events.output_add, wlr_output);
return wlr_output;