diff options
Diffstat (limited to 'examples/touch.c')
-rw-r--r-- | examples/touch.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/touch.c b/examples/touch.c index c054fea9..f32b5bba 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -183,14 +183,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(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) { |