aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-23 14:32:26 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-23 14:32:26 +1000
commit9753e52d6b5e0d83e3473cfa9908ae3a0a459e73 (patch)
treeaab60be1c2ece03b75a645852ee157e0997cbdfe /sway/commands/move.c
parentFix some bugs as a result of removing move_out_of_tabs_stacks (diff)
downloadsway-9753e52d6b5e0d83e3473cfa9908ae3a0a459e73.tar.gz
sway-9753e52d6b5e0d83e3473cfa9908ae3a0a459e73.tar.zst
sway-9753e52d6b5e0d83e3473cfa9908ae3a0a459e73.zip
Flatten container in workspace_rejigger
Diffstat (limited to 'sway/commands/move.c')
-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,
266 return; 266 return;
267 } 267 }
268 container_detach(child); 268 container_detach(child);
269 workspace_wrap_children(ws); 269 struct sway_container *new_parent = workspace_wrap_children(ws);
270 270
271 int index = move_dir == MOVE_LEFT || move_dir == MOVE_UP ? 0 : 1; 271 int index = move_dir == MOVE_LEFT || move_dir == MOVE_UP ? 0 : 1;
272 workspace_insert_tiling(ws, child, index); 272 workspace_insert_tiling(ws, child, index);
273 container_flatten(new_parent);
273 ws->layout = 274 ws->layout =
274 move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT; 275 move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT;
275 workspace_update_representation(ws); 276 workspace_update_representation(ws);