aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-27 12:29:52 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-08-16 11:46:27 -0400
commit83d9764ed8276849b6df7d4f8977720a4e048d13 (patch)
treeb4727325a330b6ddef40fe475128bc4a9ab43e70
parent869b0f14bc708883ff8e85c36e258658fa6ab475 (diff)
backend/wayland: Use output state to set init custom mode
-rw-r--r--backend/wayland/output.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 6d221285..9616c0a3 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -764,11 +764,15 @@ static struct wlr_wl_output *output_create(struct wlr_wl_backend *backend,
wlr_log(WLR_ERROR, "Failed to allocate wlr_wl_output");
return NULL;
}
- wlr_output_init(&output->wlr_output, &backend->backend, &output_impl,
- backend->local_display, NULL);
struct wlr_output *wlr_output = &output->wlr_output;
- wlr_output_update_custom_mode(wlr_output, 1280, 720, 0);
+ struct wlr_output_state state;
+ wlr_output_state_init(&state);
+ wlr_output_state_set_custom_mode(&state, 1280, 720, 0);
+
+ wlr_output_init(wlr_output, &backend->backend, &output_impl,
+ backend->local_display, &state);
+ wlr_output_state_finish(&state);
wlr_output->adaptive_sync_status = WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED;