summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--view.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/view.c b/view.c
index c005a334..d61d0deb 100644
--- a/view.c
+++ b/view.c
@@ -317,9 +317,10 @@ zoom(Arg *arg)
if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
return;
- if((c = sel) == getnext(clients))
- if(!(c = getnext(c->next)))
- return;
+ if((c = sel) == getnext(clients))
+ for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
+ if(!c)
+ return;
detach(c);
c->next = clients;
clients->prev = c;