diff options
Diffstat (limited to 'sway/tree/arrange.c')
-rw-r--r-- | sway/tree/arrange.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index 4aa82c35..9c1a11e5 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c @@ -311,12 +311,13 @@ void arrange_output(struct sway_output *output) { if (config->reloading) { return; } - const struct wlr_box *output_box = wlr_output_layout_get_box( - root->output_layout, output->wlr_output); - output->lx = output_box->x; - output->ly = output_box->y; - output->width = output_box->width; - output->height = output_box->height; + struct wlr_box output_box; + wlr_output_layout_get_box(root->output_layout, + output->wlr_output, &output_box); + output->lx = output_box.x; + output->ly = output_box.y; + output->width = output_box.width; + output->height = output_box.height; for (int i = 0; i < output->workspaces->length; ++i) { struct sway_workspace *workspace = output->workspaces->items[i]; @@ -328,12 +329,12 @@ void arrange_root(void) { if (config->reloading) { return; } - const struct wlr_box *layout_box = - wlr_output_layout_get_box(root->output_layout, NULL); - root->x = layout_box->x; - root->y = layout_box->y; - root->width = layout_box->width; - root->height = layout_box->height; + struct wlr_box layout_box; + wlr_output_layout_get_box(root->output_layout, NULL, &layout_box); + root->x = layout_box.x; + root->y = layout_box.y; + root->width = layout_box.width; + root->height = layout_box.height; if (root->fullscreen_global) { struct sway_container *fs = root->fullscreen_global; |