equal
deleted
inserted
replaced
40 focus(NULL); |
40 focus(NULL); |
41 restack(); |
41 restack(); |
42 } |
42 } |
43 |
43 |
44 void |
44 void |
45 focusclient(const char *arg) { |
45 focusnext(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) |
59 void |
60 for(c = clients; c && !isvisible(c); c = c->next); |
60 focusprev(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); |
64 restack(); |
72 restack(); |
65 } |
73 } |