diff options
Diffstat (limited to 'sway/tree/arrange.c')
-rw-r--r-- | sway/tree/arrange.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index bdef56ea..721b557e 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c | |||
@@ -73,8 +73,8 @@ void arrange_workspace(struct sway_container *workspace) { | |||
73 | area->width, area->height, area->x, area->y); | 73 | area->width, area->height, area->x, area->y); |
74 | workspace->width = area->width; | 74 | workspace->width = area->width; |
75 | workspace->height = area->height; | 75 | workspace->height = area->height; |
76 | workspace->x = area->x; | 76 | workspace->x = output->x + area->x; |
77 | workspace->y = area->y; | 77 | workspace->y = output->y + area->y; |
78 | wlr_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", | 78 | wlr_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", |
79 | workspace->name, workspace->x, workspace->y); | 79 | workspace->name, workspace->x, workspace->y); |
80 | arrange_children_of(workspace); | 80 | arrange_children_of(workspace); |
@@ -247,6 +247,18 @@ void arrange_children_of(struct sway_container *parent) { | |||
247 | arrange_children_of(child); | 247 | arrange_children_of(child); |
248 | } | 248 | } |
249 | } | 249 | } |
250 | |||
251 | // If container is a workspace, process floating containers too | ||
252 | if (parent->type == C_WORKSPACE) { | ||
253 | struct sway_workspace *ws = workspace->sway_workspace; | ||
254 | for (int i = 0; i < ws->floating->children->length; ++i) { | ||
255 | struct sway_container *child = ws->floating->children->items[i]; | ||
256 | if (child->type != C_VIEW) { | ||
257 | arrange_children_of(child); | ||
258 | } | ||
259 | } | ||
260 | } | ||
261 | |||
250 | container_damage_whole(parent); | 262 | container_damage_whole(parent); |
251 | update_debug_tree(); | 263 | update_debug_tree(); |
252 | } | 264 | } |