aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/move.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 8bf85f9b..fc2f1cc1 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -266,10 +266,11 @@ static void workspace_rejigger(struct sway_workspace *ws,
return;
}
container_detach(child);
- workspace_wrap_children(ws);
+ struct sway_container *new_parent = workspace_wrap_children(ws);
int index = move_dir == MOVE_LEFT || move_dir == MOVE_UP ? 0 : 1;
workspace_insert_tiling(ws, child, index);
+ container_flatten(new_parent);
ws->layout =
move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT;
workspace_update_representation(ws);