JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
hotfix
[dwm.git] / client.c
index 71ef677..49229a7 100644 (file)
--- a/client.c
+++ b/client.c
@@ -418,6 +418,7 @@ unmanage(Client *c)
        XSetErrorHandler(xerrordummy);
 
        detach(c);
+       detachstack(c);
        if(sel == c) {
                for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
                focus(sel);
@@ -426,7 +427,6 @@ unmanage(Client *c)
        XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
        XDestroyWindow(dpy, c->twin);
 
-       detachstack(c);
        free(c->tags);
        free(c);