summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-08-16 17:55:55 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-08-16 17:55:55 +0200
commit10bc0ce912eb99fec49d954c80d92e04429ed0ee (patch)
tree524951e34fcd67e59b672c4ae203b71f94a214b3 /layout.c
parentapplied Jukka's patch (diff)
downloaddwm-10bc0ce912eb99fec49d954c80d92e04429ed0ee.tar.gz
dwm-10bc0ce912eb99fec49d954c80d92e04429ed0ee.zip
made tag/view/toggle{tag,view} work on pointer to tags-array, there was the need to define Key key[] not static to do this. split focusclient into focusnext/prev, fixed config.*.h's
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/layout.c b/layout.c
index 4fb0be3..c467080 100644
--- a/layout.c
+++ b/layout.c
@@ -42,22 +42,30 @@ arrange(void) {
42} 42}
43 43
44void 44void
45focusclient(const char *arg) { 45focusnext(const char *arg) {
46 Client *c; 46 Client *c;
47 47
48 if(!sel || !arg) 48 if(!sel)
49 return; 49 return;
50 if(atoi(arg) < 0) { 50 for(c = sel->next; c && !isvisible(c); c = c->next);
51 for(c = sel->prev; c && !isvisible(c); c = c->prev); 51 if(!c)
52 if(!c) { 52 for(c = clients; c && !isvisible(c); c = c->next);
53 for(c = clients; c && c->next; c = c->next); 53 if(c) {
54 for(; c && !isvisible(c); c = c->prev); 54 focus(c);
55 } 55 restack();
56 } 56 }
57 else { 57}
58 for(c = sel->next; c && !isvisible(c); c = c->next); 58
59 if(!c) 59void
60 for(c = clients; c && !isvisible(c); c = c->next); 60focusprev(const char *arg) {
61 Client *c;
62
63 if(!sel)
64 return;
65 for(c = sel->prev; c && !isvisible(c); c = c->prev);
66 if(!c) {
67 for(c = clients; c && c->next; c = c->next);
68 for(; c && !isvisible(c); c = c->prev);
61 } 69 }
62 if(c) { 70 if(c) {
63 focus(c); 71 focus(c);