aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-07-01 03:20:38 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-07-15 19:27:12 +0200
commit83382f0b4ebcfeb05da57b6432cb2c08e30dde5c (patch)
tree251c7e6cab7542d6f3527251dafb2ae4838e2a2b /sway/tree/container.c
parentReplace unprintable characters in input device id (diff)
downloadsway-83382f0b4ebcfeb05da57b6432cb2c08e30dde5c.tar.gz
sway-83382f0b4ebcfeb05da57b6432cb2c08e30dde5c.tar.zst
sway-83382f0b4ebcfeb05da57b6432cb2c08e30dde5c.zip
commands/move: maintain workspace_layout when moving
Fixes #5157. (cherry picked from commit b4a75a1ab2a72842830aeea37733311f85e6f660)
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 4cc42747..fa1598ef 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1329,6 +1329,14 @@ void container_detach(struct sway_container *child) {
1329 container_update_representation(old_parent); 1329 container_update_representation(old_parent);
1330 node_set_dirty(&old_parent->node); 1330 node_set_dirty(&old_parent->node);
1331 } else if (old_workspace) { 1331 } else if (old_workspace) {
1332 // We may have removed the last tiling child from the workspace. If the
1333 // workspace layout was e.g. tabbed, then at this point it may be just
1334 // H[]. So, reset it to the default (e.g. T[]) for next time.
1335 if (!old_workspace->tiling->length) {
1336 old_workspace->layout =
1337 output_get_default_layout(old_workspace->output);
1338 }
1339
1332 workspace_update_representation(old_workspace); 1340 workspace_update_representation(old_workspace);
1333 node_set_dirty(&old_workspace->node); 1341 node_set_dirty(&old_workspace->node);
1334 } 1342 }