diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-01 08:45:19 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-05 18:01:43 +1000 |
commit | 93ff7879f16c5e31c18a37e87b23ee5dcb5a584b (patch) | |
tree | 594a58124652ebdddc3076dcb060774e194e2069 /sway/tree/arrange.c | |
parent | Fix another focus bug when moving into output (diff) | |
download | sway-93ff7879f16c5e31c18a37e87b23ee5dcb5a584b.tar.gz sway-93ff7879f16c5e31c18a37e87b23ee5dcb5a584b.tar.zst sway-93ff7879f16c5e31c18a37e87b23ee5dcb5a584b.zip |
Fix output position issue
Looks like the output dimensions need to be set when arranging rather
than when a mode is set.
Fixes an issue with position of fullscreen views.
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); |