about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 18:04:22 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 18:04:22 +0200
commite1315fd40cf7f3df911e1b4f6876c47ce1feb61c (patch)
tree55888ec9d6a23aafbbcadde91ecde751ca1ca2f1
parent52a3ab10423a4133e38281e4e19769cd3c2ed931 (diff)
downloaddwm-e1315fd40cf7f3df911e1b4f6876c47ce1feb61c.tar.gz
this makes sure the issue mentioned by sander
-rw-r--r--view.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/view.c b/view.c
index d61d0de..b76b47e 100644
--- a/view.c
+++ b/view.c
@@ -317,8 +317,14 @@ zoom(Arg *arg)
 	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
 		return;
 
-	if((c = sel) == getnext(clients))
-		for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
+	/* this is somewhat tricky, it asserts to only zoom tiled clients */
+	for(c = clients; c && c->isfloat; c = getnext(c->next));
+	if(c) {
+		if(c == sel)
+			for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
+		else
+			c = sel;
+	}
 	if(!c)
 		return;
 	detach(c);