aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-26 16:57:27 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-08-16 11:46:27 -0400
commita60361050ed3da5ab71e84c5f2a8640d472f17d9 (patch)
treea8f385c74aaea5277d4f034eb95a3f6184c33d77 /backend/headless
parent83d9764ed8276849b6df7d4f8977720a4e048d13 (diff)
backend/headless: Use output state to set init custom mode
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 12bededc..e5b1e1de 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -120,11 +120,14 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
return NULL;
}
output->backend = backend;
- wlr_output_init(&output->wlr_output, &backend->backend, &output_impl,
- backend->display, NULL);
struct wlr_output *wlr_output = &output->wlr_output;
- output_set_custom_mode(output, width, height, 0);
+ struct wlr_output_state state;
+ wlr_output_state_init(&state);
+ wlr_output_state_set_custom_mode(&state, width, height, 0);
+
+ wlr_output_init(wlr_output, &backend->backend, &output_impl, backend->display, &state);
+ wlr_output_state_finish(&state);
size_t output_num = ++last_output_num;