equal
deleted
inserted
replaced
68 LAYOUTS |
68 LAYOUTS |
69 |
69 |
70 /* extern */ |
70 /* extern */ |
71 |
71 |
72 void |
72 void |
73 focusnext(const char *arg) { |
73 focusclient(const char *arg) { |
74 Client *c; |
74 Client *c; |
75 |
75 |
76 if(!sel) |
76 if(!sel || !arg) |
77 return; |
77 return; |
78 for(c = sel->next; c && !isvisible(c); c = c->next); |
78 switch(atoi(arg)) { |
79 if(!c) |
79 default: |
80 for(c = clients; c && !isvisible(c); c = c->next); |
80 return; |
81 if(c) { |
81 case 1: |
82 focus(c); |
82 for(c = sel->next; c && !isvisible(c); c = c->next); |
83 restack(); |
83 if(!c) |
84 } |
84 for(c = clients; c && !isvisible(c); c = c->next); |
85 } |
85 break; |
86 |
86 case -1: |
87 void |
87 for(c = sel->prev; c && !isvisible(c); c = c->prev); |
88 focusprev(const char *arg) { |
88 if(!c) { |
89 Client *c; |
89 for(c = clients; c && c->next; c = c->next); |
90 |
90 for(; c && !isvisible(c); c = c->prev); |
91 if(!sel) |
91 } |
92 return; |
92 break; |
93 for(c = sel->prev; c && !isvisible(c); c = c->prev); |
|
94 if(!c) { |
|
95 for(c = clients; c && c->next; c = c->next); |
|
96 for(; c && !isvisible(c); c = c->prev); |
|
97 } |
93 } |
98 if(c) { |
94 if(c) { |
99 focus(c); |
95 focus(c); |
100 restack(); |
96 restack(); |
101 } |
97 } |