aboutsummarylogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe2007-05-14 11:54:30 +0200
committerAnselm R. Garbe2007-05-14 11:54:30 +0200
commit5e72b510e988356884a09591a3970108f35c43ad (patch)
tree845b78279c752fddee3ac6e11cd300deddb4f6d8 /client.c
parent05f6d31a69d95e8a39a7f65d158dadc9a66b0193 (diff)
downloadaur-5e72b510e988356884a09591a3970108f35c43ad.tar.gz
applied dfenze cleanups, fixed some comments in dwm.h
Diffstat (limited to 'client.c')
-rw-r--r--client.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/client.c b/client.c
index 3db14f5c9457..72e5c32029da 100644
--- a/client.c
+++ b/client.c
@@ -153,6 +153,14 @@ focus(Client *c) {
}
void
+focustopvisible(void) {
+ Client *c;
+
+ for(c = stack; c && !isvisible(c); c = c->snext);
+ focus(c);
+}
+
+void
killclient(const char *arg) {
XEvent ev;
@@ -391,10 +399,8 @@ unmanage(Client *c) {
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
detach(c);
detachstack(c);
- if(sel == c) {
- for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
- focus(nc);
- }
+ if(sel == c)
+ focustopvisible();
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
setclientstate(c, WithdrawnState);
free(c->tags);