summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-05 23:22:33 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-06 09:43:52 -0400
commita06052ad9da8f5e03b17aa791be49189f21b7a4f (patch)
tree75e3b67516601ab9b95599e7c2be70066b8552ee /sway
parentFix workspaces not updated on swaybar (diff)
downloadsway-a06052ad9da8f5e03b17aa791be49189f21b7a4f.tar.gz
sway-a06052ad9da8f5e03b17aa791be49189f21b7a4f.tar.zst
sway-a06052ad9da8f5e03b17aa791be49189f21b7a4f.zip
Fix splitting workspaces
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/layout.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index e91fd5ac..0011a9e3 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -951,6 +951,14 @@ struct sway_container *container_split(struct sway_container *child,
951 if (!sway_assert(child, "child cannot be null")) { 951 if (!sway_assert(child, "child cannot be null")) {
952 return NULL; 952 return NULL;
953 } 953 }
954 if (child->type == C_WORKSPACE && child->children->length == 0) {
955 // Special case: this just behaves like splitt
956 child->prev_layout = child->layout;
957 child->layout = layout;
958 arrange_windows(child, -1, -1);
959 return child;
960 }
961
954 struct sway_container *cont = container_create(C_CONTAINER); 962 struct sway_container *cont = container_create(C_CONTAINER);
955 963
956 wlr_log(L_DEBUG, "creating container %p around %p", cont, child); 964 wlr_log(L_DEBUG, "creating container %p around %p", cont, child);