summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/client.c b/client.c
index 4afa705..c20c517 100644
--- a/client.c
+++ b/client.c
@@ -476,7 +476,7 @@ unmanage(Client *c)
476void 476void
477zoom(Arg *arg) 477zoom(Arg *arg)
478{ 478{
479 Client *c; 479 Client *c, **l;
480 480
481 if(!sel) 481 if(!sel)
482 return; 482 return;
@@ -486,6 +486,19 @@ zoom(Arg *arg)
486 sel = c; 486 sel = c;
487 } 487 }
488 488
489 pop(sel); 489 /* pop */
490 for(l = &clients; *l && *l != sel; l = &(*l)->next);
491 if(sel->prev)
492 sel->prev->next = sel->next;
493 if(sel->next)
494 sel->next->prev = sel->prev;
495 *l = sel->next;
496
497 sel->prev = NULL;
498 if(clients)
499 clients->prev = sel;
500 sel->next = clients;
501 clients = sel;
502 arrange(NULL);
490 focus(sel); 503 focus(sel);
491} 504}