about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-06 15:36:42 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-06 15:36:42 +0200
commita33150eb4b041b243d0493cd4b53bfbcace3299e (patch)
tree706bc86a80a2ffe281e12935f29508ef9597d5f3
parentfd00b3a18620c70721c4c4d9f0169e06b9ce4437 (diff)
downloaddwm-a33150eb4b041b243d0493cd4b53bfbcace3299e.tar.gz
no this is better
-rw-r--r--client.c7
-rw-r--r--view.c15
2 files changed, 11 insertions, 11 deletions
diff --git a/client.c b/client.c
index 45cb3a3..586a87f 100644
--- a/client.c
+++ b/client.c
@@ -99,13 +99,6 @@ focus(Client *c)
 		}
 	}
 	if(c) {
-		if(c->isfloat || arrange == dofloat) {
-			detach(c);
-			if(clients)
-				clients->prev = c;
-			c->next = clients;
-			clients = c;
-		}
 		grabbuttons(c, True);
 		drawtitle(c);
 		XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
diff --git a/view.c b/view.c
index e74d4bc..eddf2da 100644
--- a/view.c
+++ b/view.c
@@ -18,6 +18,15 @@ minclient()
 	return min;
 }
 
+static void
+pop(Client *c)
+{
+	detach(c);
+	if(clients)
+		clients->prev = c;
+	c->next = clients;
+	clients = c;
+}
 
 static void
 reorder()
@@ -223,6 +232,7 @@ restack()
 		return;
 	}
 	if(sel->isfloat || arrange == dofloat) {
+		pop(sel);
 		XRaiseWindow(dpy, sel->win);
 		XRaiseWindow(dpy, sel->twin);
 	}
@@ -297,10 +307,7 @@ zoom(Arg *arg)
 	if((c = sel) == nexttiled(clients))
 		if(!(c = nexttiled(c->next)))
 			return;
-	detach(c);
-	c->next = clients;
-	clients->prev = c;
-	clients = c;
+	pop(c);
 	focus(c);
 	arrange(NULL);
 }
3 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235