From 2aabaf88096864f4a9c534f94c909968d0b62b19 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 26 Jun 2023 20:07:36 +0200 Subject: examples: enable new outputs --- examples/simple.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples/simple.c') diff --git a/examples/simple.c b/examples/simple.c index 533e42b5..781ee0e9 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -106,14 +106,15 @@ static void new_output_notify(struct wl_listener *listener, void *data) { wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; + 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(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(sample_output->output, &state); - wlr_output_state_finish(&state); } + wlr_output_commit_state(output, &state); + wlr_output_state_finish(&state); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { -- cgit v1.2.3