mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/headless: Use output state to set init custom mode
This commit is contained in:
parent
83d9764ed8
commit
a60361050e
1 changed files with 6 additions and 3 deletions
|
@ -120,11 +120,14 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
output->backend = backend;
|
output->backend = backend;
|
||||||
wlr_output_init(&output->wlr_output, &backend->backend, &output_impl,
|
|
||||||
backend->display, NULL);
|
|
||||||
struct wlr_output *wlr_output = &output->wlr_output;
|
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;
|
size_t output_num = ++last_output_num;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue