From 1f2e399ade77070a2d0b82856ad9a3eef96b8676 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 24 May 2018 22:30:44 +1000 Subject: Implement floating --- sway/tree/arrange.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sway/tree/arrange.c') diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index bdef56ea..da4f7889 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c @@ -247,6 +247,18 @@ void arrange_children_of(struct sway_container *parent) { arrange_children_of(child); } } + + // If container is a workspace, process floating containers too + if (parent->type == C_WORKSPACE) { + struct sway_workspace *ws = workspace->sway_workspace; + for (int i = 0; i < ws->floating->children->length; ++i) { + struct sway_container *child = ws->floating->children->items[i]; + if (child->type != C_VIEW) { + arrange_children_of(child); + } + } + } + container_damage_whole(parent); update_debug_tree(); } -- cgit v1.2.3