void
unmanage(Client *c)
{
- Client *tc, *fc;
- Window trans;
+ Client *nc;
+
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
detach(c);
+ detachstack(c);
if(sel == c) {
- XGetTransientForHint(dpy, c->win, &trans);
- if(trans && (tc = getclient(trans)) && isvisible(tc))
- fc = tc;
- else
- fc = getnext(clients);
- focus(fc);
+ for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
+ focus(nc);
}
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
XDestroyWindow(dpy, c->twin);
- detachstack(c);
free(c->tags);
free(c);