]> git.lizzy.rs Git - bspwm.git/blobdiff - src/tree.c
Allow setting a node's splitting type
[bspwm.git] / src / tree.c
index e6faadd8dc3497f4200a6163c22e9408688a13d2..6f75dc366307578ad93cccff0e8efe361e5f615c 100644 (file)
@@ -190,6 +190,17 @@ presel_t *make_presel(void)
        return p;
 }
 
+void set_type(node_t *n, split_type_t typ)
+{
+       if (n == NULL) {
+               return;
+       }
+
+       n->split_type = typ;
+       update_constraints(n);
+       rebuild_constraints_towards_root(n);
+}
+
 void set_ratio(node_t *n, double rat)
 {
        if (n == NULL) {