summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2017-01-14 19:48:41 +0100
committerFurkan Sahin <furkan-dev@proton.me>2017-01-14 19:48:41 +0100
commit9a0c26b19924fb1907959599fc8de2b5f6e4cb10 (patch)
tree7d9d94cbd7ec6cc6b817ca2796bb6c97997c5607
parent9deaecd28549c316686b9a9c7227d2d508aafb8c (diff)
[fix] handle auto layout of empty container
-rw-r--r--sway/layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index e3de3354..5e144cd8 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -1615,7 +1615,8 @@ size_t auto_slave_group_count(const swayc_t *container) {
* Return the combined number of master and slave groups in the container.
*/
size_t auto_group_count(const swayc_t *container) {
- return auto_slave_group_count(container) + (container->nb_master ? 1 : 0);
+ return auto_slave_group_count(container)
+ + (container->children->length && container->nb_master ? 1 : 0);
}
/**