aboutsummaryrefslogtreecommitdiff
path: root/examples/scene-graph.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/scene-graph.c
parent0925a500d1b4709a6058b2d1174a5aab90a5e34e (diff)
examples: Drop usage of wlr_output.pending
Diffstat (limited to 'examples/scene-graph.c')
-rw-r--r--examples/scene-graph.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/scene-graph.c b/examples/scene-graph.c
index 3d75164b..68441c11 100644
--- a/examples/scene-graph.c
+++ b/examples/scene-graph.c
@@ -81,10 +81,12 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
output->scene_output = wlr_scene_output_create(server->scene, wlr_output);
- if (!wl_list_empty(&wlr_output->modes)) {
- struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
- wlr_output_set_mode(wlr_output, mode);
- wlr_output_commit(wlr_output);
+ struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
+ if (mode != NULL) {
+ struct wlr_output_state state = {0};
+ wlr_output_state_set_mode(&state, mode);
+ wlr_output_commit_state(wlr_output, &state);
+ wlr_output_state_finish(&state);
}
wlr_output_create_global(wlr_output);