]> git.sur5r.net Git - i3/i3/blobdiff - include/tree.h
Implement tree flattening to automatically solve situations of redundant chains of...
[i3/i3] / include / tree.h
index 6376ed9241d5bc6c931ec2e979456187f4745b53..c93d4c22f87df2d0fbb0b910801d8a3c64910ae9 100644 (file)
@@ -84,4 +84,19 @@ void tree_close(Con *con, bool kill_window, bool dont_kill_parent);
  */
 bool tree_restore(const char *path);
 
+/**
+ * tree_flatten() removes pairs of redundant split containers, e.g.:
+ *       [workspace, horizontal]
+ *   [v-split]           [child3]
+ *   [h-split]
+ * [child1] [child2]
+ * In this example, the v-split and h-split container are redundant.
+ * Such a situation can be created by moving containers in a direction which is
+ * not the orientation of their parent container. i3 needs to create a new
+ * split container then and if you move containers this way multiple times,
+ * redundant chains of split-containers can be the result.
+ *
+ */
+void tree_flatten(Con *child);
+
 #endif