examples: enable new outputs

This commit is contained in:
Simon Ser 2023-06-26 20:07:36 +02:00 committed by Alexander Orzechowski
parent 9e6431dc3b
commit 2aabaf8809
9 changed files with 44 additions and 37 deletions

View file

@ -165,14 +165,15 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
wlr_output_layout_add_auto(server->output_layout, wlr_output);
wlr_output_create_global(wlr_output);
struct wlr_output_state state;
wlr_output_state_init(&state);
wlr_output_state_set_enabled(&state, true);
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
if (mode != NULL) {
struct wlr_output_state state;
wlr_output_state_init(&state);
wlr_output_state_set_mode(&state, mode);
wlr_output_commit_state(wlr_output, &state);
wlr_output_state_finish(&state);
}
wlr_output_commit_state(wlr_output, &state);
wlr_output_state_finish(&state);
}
static void server_handle_present_surface(struct wl_listener *listener,