aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index c9290108..7e9df59f 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -374,4 +374,17 @@ bool container_is_sticky(struct sway_container *con);
374 374
375bool container_is_sticky_or_child(struct sway_container *con); 375bool container_is_sticky_or_child(struct sway_container *con);
376 376
377/**
378 * This will destroy pairs of redundant H/V splits
379 * e.g. H[V[H[app app]] app] -> H[app app app]
380 * The middle "V[H[" are eliminated by a call to container_squash
381 * on the V[ con. It's grandchildren are added to it's parent.
382 *
383 * This function is roughly equivalent to i3's tree_flatten here:
384 * https://github.com/i3/i3/blob/1f0c628cde40cf87371481041b7197344e0417c6/src/tree.c#L651
385 *
386 * Returns the number of new containers added to the parent
387 */
388int container_squash(struct sway_container *con);
389
377#endif 390#endif