about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c15
1 files changed, 11 insertions, 4 deletions
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);
 }
iv>
b3d031a9 ^
2948ed45 ^
ab41c776 ^
2948ed45 ^
d1a1173d ^
b3d031a9 ^
d1a1173d ^


2948ed45 ^

ab41c776 ^

b3d031a9 ^
d1a1173d ^





b3d031a9 ^
2948ed45 ^
ab41c776 ^
2948ed45 ^
d1a1173d ^

2948ed45 ^
ab41c776 ^
2948ed45 ^
d1a1173d ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46