diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-01-29 23:11:54 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-01-31 11:44:03 +0100 |
commit | ee7668c1f2b5ba31420d972161d6d43fc1c84bb4 (patch) | |
tree | db2d114113e60cfa4f5a1c87813c53868e0bf9f1 /sway/desktop/output.c | |
parent | 69b430201cb19c666f102586b18f1dfbda7c44a3 (diff) |
chore: chase wlr_output_layout_get_box() update
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 852671d2..dd2eaf08 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -737,14 +737,15 @@ static void update_output_manager_config(struct sway_server *server) { } struct wlr_output_configuration_head_v1 *config_head = wlr_output_configuration_head_v1_create(config, output->wlr_output); - struct wlr_box *output_box = wlr_output_layout_get_box( - root->output_layout, output->wlr_output); + struct wlr_box output_box; + wlr_output_layout_get_box(root->output_layout, + output->wlr_output, &output_box); // We mark the output enabled even if it is switched off by DPMS config_head->state.enabled = output->current_mode != NULL && output->enabled; config_head->state.mode = output->current_mode; - if (output_box) { - config_head->state.x = output_box->x; - config_head->state.y = output_box->y; + if (!wlr_box_empty(&output_box)) { + config_head->state.x = output_box.x; + config_head->state.y = output_box.y; } } |