From 495bcbeedde21eaa9d68ceef1fba5109d5d50dee Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 12 Jun 2023 20:16:25 -0400 Subject: examples: Drop usage of wlr_output.pending --- examples/simple.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/simple.c') diff --git a/examples/simple.c b/examples/simple.c index 0c737106..fa52bce5 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -107,10 +107,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) { struct wlr_output_mode *mode = wlr_output_preferred_mode(output); if (mode != NULL) { - wlr_output_set_mode(output, mode); + struct wlr_output_state state = {0}; + wlr_output_state_set_mode(&state, mode); + wlr_output_commit_state(sample_output->output, &state); + wlr_output_state_finish(&state); } - - wlr_output_commit(sample_output->output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { -- cgit v1.2.3