diff options
-rw-r--r-- | sway/desktop/output.c | 4 | ||||
-rw-r--r-- | sway/tree/arrange.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index d9c7dbe3..7e9f7b7e 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -505,10 +505,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
505 | 505 | ||
506 | static void handle_mode(struct wl_listener *listener, void *data) { | 506 | static void handle_mode(struct wl_listener *listener, void *data) { |
507 | struct sway_output *output = wl_container_of(listener, output, mode); | 507 | struct sway_output *output = wl_container_of(listener, output, mode); |
508 | output->lx = output->wlr_output->lx; | ||
509 | output->ly = output->wlr_output->ly; | ||
510 | wlr_output_effective_resolution(output->wlr_output, | ||
511 | &output->width, &output->height); | ||
512 | arrange_layers(output); | 508 | arrange_layers(output); |
513 | arrange_output(output); | 509 | arrange_output(output); |
514 | transaction_commit_dirty(); | 510 | transaction_commit_dirty(); |
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); |