diff options
Diffstat (limited to '')
| -rw-r--r-- | tag.c | 27 |
1 files changed, 23 insertions, 4 deletions
| @@ -49,7 +49,7 @@ dofloat(Arg *arg) | |||
| 49 | ban(c); | 49 | ban(c); |
| 50 | } | 50 | } |
| 51 | if(sel && !sel->tags[tsel]) { | 51 | if(sel && !sel->tags[tsel]) { |
| 52 | if((sel = getnext(clients))) { | 52 | if((sel = getnext(clients, tsel))) { |
| 53 | higher(sel); | 53 | higher(sel); |
| 54 | focus(sel); | 54 | focus(sel); |
| 55 | } | 55 | } |
| @@ -106,7 +106,7 @@ dotile(Arg *arg) | |||
| 106 | ban(c); | 106 | ban(c); |
| 107 | } | 107 | } |
| 108 | if(!sel || (sel && !sel->tags[tsel])) { | 108 | if(!sel || (sel && !sel->tags[tsel])) { |
| 109 | if((sel = getnext(clients))) { | 109 | if((sel = getnext(clients, tsel))) { |
| 110 | higher(sel); | 110 | higher(sel); |
| 111 | focus(sel); | 111 | focus(sel); |
| 112 | } | 112 | } |
| @@ -115,13 +115,32 @@ dotile(Arg *arg) | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | Client * | 117 | Client * |
| 118 | getnext(Client *c) | 118 | getnext(Client *c, unsigned int t) |
| 119 | { | 119 | { |
| 120 | for(; c && !c->tags[tsel]; c = c->next); | 120 | for(; c && !c->tags[t]; c = c->next); |
| 121 | return c; | 121 | return c; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | void | 124 | void |
| 125 | heretag(Arg *arg) | ||
| 126 | { | ||
| 127 | int i; | ||
| 128 | Client *c; | ||
| 129 | |||
| 130 | if(arg->i == tsel) | ||
| 131 | return; | ||
| 132 | |||
| 133 | if(!(c = getnext(clients, arg->i))) | ||
| 134 | return; | ||
| 135 | |||
| 136 | for(i = 0; i < TLast; i++) | ||
| 137 | c->tags[i] = NULL; | ||
| 138 | c->tags[tsel] = tags[tsel]; | ||
| 139 | arrange(NULL); | ||
| 140 | focus(c); | ||
| 141 | } | ||
| 142 | |||
| 143 | void | ||
| 125 | replacetag(Arg *arg) | 144 | replacetag(Arg *arg) |
| 126 | { | 145 | { |
| 127 | int i; | 146 | int i; |
