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.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/view.c b/view.c
index 9ee4c78..5cbab08 100644
--- a/view.c
+++ b/view.c
@@ -76,8 +76,10 @@ dofloat(Arg *arg)
 		else
 			ban(c);
 	}
-	if(!sel || !isvisible(sel))
-		focus(getnext(clients));
+	if(!sel || !isvisible(sel)) {
+		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+		focus(sel);
+	}
 	restack();
 }
 
@@ -138,8 +140,10 @@ dotile(Arg *arg)
 		else
 			ban(c);
 	}
-	if(!sel || !isvisible(sel))
-		focus(getnext(clients));
+	if(!sel || !isvisible(sel)) {
+		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+		focus(sel);
+	}
 	restack();
 }
 
@@ -227,7 +231,7 @@ restack()
 		XRaiseWindow(dpy, sel->win);
 		XRaiseWindow(dpy, sel->twin);
 	}
-	if(arrange != dofloat) 
+	if(arrange != dofloat)
 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
 			XLowerWindow(dpy, c->twin);
 			XLowerWindow(dpy, c->win);
3:18:13 -0700 committer Kartik Agaram <vc@akkartik.com> 2020-05-10 13:18:13 -0700 6217 - make subx.vim work better out of the box' href='/akkartik/mu/commit/subx.vim?h=main&id=3fb900de1317e2cf0a287e5a41d0e343abadc6ce'>3fb900de ^
c56d803c ^
d1262cd6 ^
2c6a077f ^
3fb900de ^
2c6a077f ^
1837c616 ^
a0db7903 ^
c2532c2d ^
76aace46 ^
e59a91b7 ^
39d718af ^

a8f47b4a ^
c6f52200 ^


e59a91b7 ^
39d718af ^
3fb900de ^
50a6c048 ^
3fb900de ^
39d718af ^
3fb900de ^
39d718af ^
cbe5bec6 ^
39d718af ^
9272b6ce ^

521ff2f1 ^
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75