JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied Sander's patch as well
[dwm.git] / client.c
index 8ec8ffb..9710989 100644 (file)
--- a/client.c
+++ b/client.c
@@ -438,13 +438,8 @@ unmanage(Client *c)
                c->next->prev = c->prev;
        if(c == clients)
                clients = c->next;
-       if(sel == c) {
-               sel = getnext(c->next);
-               if(!sel)
-                       sel = getprev(c->prev);
-               if(!sel)
-                       sel = clients;
-       }
+       if(sel == c)
+               sel = getnext(clients);
        free(c->tags);
        free(c);
 
@@ -472,13 +467,11 @@ zoom(Arg *arg)
        }
 
        /* pop */
-       if(sel->prev)
-               sel->prev->next = sel->next;
+       sel->prev->next = sel->next;
        if(sel->next)
                sel->next->prev = sel->prev;
        sel->prev = NULL;
-       if(clients)
-               clients->prev = sel;
+       clients->prev = sel;
        sel->next = clients;
        clients = sel;
        arrange(NULL);