void
unmanage(Client *c)
{
+ Client *nc;
+
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
detach(c);
detachstack(c);
if(sel == c) {
- for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
- focus(sel);
+ for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
+ focus(nc);
}
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
ban(c);
}
if(!sel || !isvisible(sel)) {
- for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
- focus(sel);
+ for(c = stack; c && !isvisible(c); c = c->snext);
+ focus(c);
}
restack();
}
ban(c);
}
if(!sel || !isvisible(sel)) {
- for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
- focus(sel);
+ for(c = stack; c && !isvisible(c); c = c->snext);
+ focus(c);
}
restack();
}