backend = wl_backend_from_backend(ds_backend);
+ if (!ds_backend->started) {
+ backend->requested_outputs++;
+ return NULL;
+ }
+
+ output = create_wl_output(backend);
+ if (!output) {
+ ds_err("Could not create ds_wl_output");
+ return NULL;
+ }
+
+ return &output->base;
+}
+
+struct ds_wl_output *
+create_wl_output(struct ds_wl_backend *backend)
+{
+ struct ds_wl_output *output;
+
output = calloc(1, sizeof *output);
if (!output) {
ds_log_errno(DS_ERR, "Could not allocate ds_wl_output");
ds_dbg("Wayland output(%p) created", output);
- return &output->base;
+ return output;
err:
ds_output_destroy(&output->base);