about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-16 10:20:34 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-16 10:20:34 +0100
commit8a5f002c4182abf6dcaac354a3da04cc18830ad9 (patch)
tree91aa8fba3524ed70aa037f49ee0abcf93ea64acb /view.c
parent3ce8c9f33844a995e79329978db9d2cd3981e032 (diff)
downloaddwm-8a5f002c4182abf6dcaac354a3da04cc18830ad9.tar.gz
removed getnext/getprev, redundant
Diffstat (limited to 'view.c')
-rw-r--r--view.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/view.c b/view.c
index 5c06027..6985dc7 100644
--- a/view.c
+++ b/view.c
@@ -8,7 +8,7 @@
 
 static Client *
 nexttiled(Client *c) {
-	for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
+	for(; c && (c->isfloat || !isvisible(c)); c = c->next);
 	return c;
 }
 
@@ -125,8 +125,9 @@ focusnext(Arg *arg) {
    
 	if(!sel)
 		return;
-	if(!(c = getnext(sel->next)))
-		c = getnext(clients);
+	for(c = sel->next; c && !isvisible(c); c = c->next);
+	if(!c)
+		for(c = clients; c && !isvisible(c); c = c->next);
 	if(c) {
 		focus(c);
 		restack();
@@ -139,9 +140,10 @@ focusprev(Arg *arg) {
 
 	if(!sel)
 		return;
-	if(!(c = getprev(sel->prev))) {
+	for(c = sel->prev; c && !isvisible(c); c = c->prev);
+	if(!c) {
 		for(c = clients; c && c->next; c = c->next);
-		c = getprev(c);
+		for(; c && !isvisible(c); c = c->prev);
 	}
 	if(c) {
 		focus(c);
ik K. Agaram <vc@akkartik.com> 2015-07-28 14:33:22 -0700 1868 - start using naked literals everywhere' href='/akkartik/mu/commit/073scenario_screen_test.mu?h=hlt&id=bc6436927640603675e2e700007f53c5ab213869'>bc643692 ^
6f65d591 ^

fb942da8 ^
6f65d591 ^
fb942da8 ^
1fd41772 ^
fb942da8 ^
1fd41772 ^






e80fd05f ^














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