diff options
Diffstat (limited to 'sway/tree/arrange.c')
-rw-r--r-- | sway/tree/arrange.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index 2cccf65a..edb05f86 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c | |||
@@ -217,8 +217,8 @@ void arrange_workspace(struct sway_workspace *workspace) { | |||
217 | workspace->x, workspace->y); | 217 | workspace->x, workspace->y); |
218 | if (workspace->fullscreen) { | 218 | if (workspace->fullscreen) { |
219 | struct sway_container *fs = workspace->fullscreen; | 219 | struct sway_container *fs = workspace->fullscreen; |
220 | fs->x = output->wlr_output->lx; | 220 | fs->x = output->lx; |
221 | fs->y = output->wlr_output->ly; | 221 | fs->y = output->ly; |
222 | fs->width = output->width; | 222 | fs->width = output->width; |
223 | fs->height = output->height; | 223 | fs->height = output->height; |
224 | arrange_container(fs); | 224 | arrange_container(fs); |
@@ -234,8 +234,13 @@ void arrange_output(struct sway_output *output) { | |||
234 | if (config->reloading) { | 234 | if (config->reloading) { |
235 | return; | 235 | return; |
236 | } | 236 | } |
237 | // Outputs have no pending x/y/width/height, | 237 | const struct wlr_box *output_box = wlr_output_layout_get_box( |
238 | // so all we do here is arrange the workspaces. | 238 | root->output_layout, output->wlr_output); |
239 | output->lx = output_box->x; | ||
240 | output->ly = output_box->y; | ||
241 | output->width = output_box->width; | ||
242 | output->height = output_box->height; | ||
243 | |||
239 | for (int i = 0; i < output->workspaces->length; ++i) { | 244 | for (int i = 0; i < output->workspaces->length; ++i) { |
240 | struct sway_workspace *workspace = output->workspaces->items[i]; | 245 | struct sway_workspace *workspace = output->workspaces->items[i]; |
241 | arrange_workspace(workspace); | 246 | arrange_workspace(workspace); |