]> git.lizzy.rs Git - bspwm.git/commitdiff
Don't remove non-receptacles in `kill_node`
authorBastien Dejean <nihilhill@gmail.com>
Mon, 31 May 2021 09:22:59 +0000 (11:22 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Mon, 31 May 2021 09:22:59 +0000 (11:22 +0200)
Fixes #1268.

src/tree.c

index 97dce282ded10866c07c22c0504b73abe3dfe608..1b6e0912a266851bd9c75eb25a6d77fde159cb26 100644 (file)
@@ -1393,13 +1393,15 @@ void kill_node(monitor_t *m, desktop_t *d, node_t *n)
                return;
        }
 
-       for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
-               if (f->client != NULL) {
-                       xcb_kill_client(dpy, f->id);
+       if (IS_RECEPTACLE(n)) {
+               remove_node(m, d, n);
+       } else {
+               for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
+                       if (f->client != NULL) {
+                               xcb_kill_client(dpy, f->id);
+                       }
                }
        }
-
-       remove_node(m, d, n);
 }
 
 void remove_node(monitor_t *m, desktop_t *d, node_t *n)