compositor: send the output_created signal after inserting it in the list
The compositor's output_created signal used to be sent in weston_output_init()
which the backend call before putting the output in the output_list.
This caused problems when creating a new view in a listener to that signal,
because weston_view_assign_output() doesn't yet know the new output exists.
To fix this add a new weston_composito_add_output() func which adds the
output in the list and later sends the signal, and make the backends call
that.
diff --git a/src/compositor.h b/src/compositor.h
index f9834ba..867f8c4 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1374,6 +1374,9 @@
weston_output_init(struct weston_output *output, struct weston_compositor *c,
int x, int y, int width, int height, uint32_t transform, int32_t scale);
void
+weston_compositor_add_output(struct weston_compositor *compositor,
+ struct weston_output *output);
+void
weston_output_destroy(struct weston_output *output);
void
weston_output_transform_coordinate(struct weston_output *output,