aboutsummaryrefslogtreecommitdiff
path: root/examples/output-layers.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-06-26 20:07:36 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-06-27 16:26:30 +0000
commit2aabaf88096864f4a9c534f94c909968d0b62b19 (patch)
treecf42282606d2ac4a2595cde359936147fd1a3df8 /examples/output-layers.c
parent9e6431dc3bd121b1994961c68374b4e17db29444 (diff)
examples: enable new outputs
Diffstat (limited to 'examples/output-layers.c')
-rw-r--r--examples/output-layers.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/output-layers.c b/examples/output-layers.c
index 092394f5..cec3b50b 100644
--- a/examples/output-layers.c
+++ b/examples/output-layers.c
@@ -174,14 +174,15 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
wl_signal_add(&wlr_output->events.frame, &output->frame);
wl_list_insert(&server->outputs, &output->link);
+ 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);
wlr_output_create_global(wlr_output);
}