JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied Sander's patch as well
[dwm.git] / client.c
index 57ea617..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,8 +467,7 @@ 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;