diff options
author | Simon Ser <contact@emersion.fr> | 2023-06-13 10:44:26 +0200 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-06-13 12:02:49 +0000 |
commit | 670915eeeaa2faee95cb3c32c64199da4379adf8 (patch) | |
tree | a7e66fee3447da091489c49ddb08fda8c488b356 /examples/output-layers.c | |
parent | 73ca1ea48a208a1ef9b21ffe9f721a4289deb15c (diff) |
output: add wlr_output_state_set_layers()
Diffstat (limited to 'examples/output-layers.c')
-rw-r--r-- | examples/output-layers.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/output-layers.c b/examples/output-layers.c index 973633d4..e6ec8150 100644 --- a/examples/output-layers.c +++ b/examples/output-layers.c @@ -82,11 +82,9 @@ static void output_handle_frame(struct wl_listener *listener, void *data) { }; } - struct wlr_output_state output_state = { - .committed = WLR_OUTPUT_STATE_LAYERS, - .layers = layers_arr.data, - .layers_len = layers_arr.size / sizeof(struct wlr_output_layer_state), - }; + struct wlr_output_state output_state = {0}; + wlr_output_state_set_layers(&output_state, layers_arr.data, + layers_arr.size / sizeof(struct wlr_output_layer_state)); if (!wlr_output_test_state(output->wlr_output, &output_state)) { wlr_log(WLR_ERROR, "wlr_output_test() failed"); |