summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar wil <william.barsse@gmail.com>2017-01-14 19:48:41 +0100
committerLibravatar wil <william.barsse@gmail.com>2017-01-14 19:48:41 +0100
commita90dddea4014707c2240e1c20a7b1a1500f4605d (patch)
tree7d9d94cbd7ec6cc6b817ca2796bb6c97997c5607
parentAdded a sample config for Awesome-like behavior (diff)
downloadsway-a90dddea4014707c2240e1c20a7b1a1500f4605d.tar.gz
sway-a90dddea4014707c2240e1c20a7b1a1500f4605d.tar.zst
sway-a90dddea4014707c2240e1c20a7b1a1500f4605d.zip
[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) {
1615 * Return the combined number of master and slave groups in the container. 1615 * Return the combined number of master and slave groups in the container.
1616 */ 1616 */
1617size_t auto_group_count(const swayc_t *container) { 1617size_t auto_group_count(const swayc_t *container) {
1618 return auto_slave_group_count(container) + (container->nb_master ? 1 : 0); 1618 return auto_slave_group_count(container)
1619 + (container->children->length && container->nb_master ? 1 : 0);
1619} 1620}
1620 1621
1621/** 1622/**