summaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index f56fbffa..d1ad044d 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -872,6 +872,8 @@ struct sway_container *container_split(struct sway_container *child,
wlr_log(L_DEBUG, "creating container %p around %p", cont, child);
+ remove_gaps(child);
+
cont->prev_layout = L_NONE;
cont->width = child->width;
cont->height = child->height;
@@ -880,6 +882,9 @@ struct sway_container *container_split(struct sway_container *child,
struct sway_seat *seat = input_manager_get_default_seat(input_manager);
bool set_focus = (seat_get_focus(seat) == child);
+
+ add_gaps(cont);
+
if (child->type == C_WORKSPACE) {
struct sway_container *workspace = child;
while (workspace->children->length) {
@@ -907,7 +912,7 @@ struct sway_container *container_split(struct sway_container *child,
}
container_notify_subtree_changed(cont);
-
+ arrange_children_of(cont);
return cont;
}