aboutsummaryrefslogtreecommitdiff
path: root/examples/output-layout.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-12 20:16:25 -0400
committerSimon Ser <contact@emersion.fr>2023-06-13 09:19:51 +0000
commit495bcbeedde21eaa9d68ceef1fba5109d5d50dee (patch)
treea091b0e173e8950b2608836fe12e0c5959d188de /examples/output-layout.c
parent0925a500d1b4709a6058b2d1174a5aab90a5e34e (diff)
examples: Drop usage of wlr_output.pending
Diffstat (limited to 'examples/output-layout.c')
-rw-r--r--examples/output-layout.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/output-layout.c b/examples/output-layout.c
index 1094141c..ee45c9c2 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -178,10 +178,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(output, &state);
+ wlr_output_state_finish(&state);
}
-
- wlr_output_commit(output);
}
static void keyboard_key_notify(struct wl_listener *listener, void *data) {