diff options
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 46 |
1 files changed, 8 insertions, 38 deletions
| @@ -171,38 +171,6 @@ focus(Client *c) { | |||
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | void | 173 | void |
| 174 | focusnext(Arg *arg) { | ||
| 175 | Client *c; | ||
| 176 | |||
| 177 | if(!sel) | ||
| 178 | return; | ||
| 179 | for(c = sel->next; c && !isvisible(c); c = c->next); | ||
| 180 | if(!c) | ||
| 181 | for(c = clients; c && !isvisible(c); c = c->next); | ||
| 182 | if(c) { | ||
| 183 | focus(c); | ||
| 184 | restack(); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 188 | void | ||
| 189 | focusprev(Arg *arg) { | ||
| 190 | Client *c; | ||
| 191 | |||
| 192 | if(!sel) | ||
| 193 | return; | ||
| 194 | for(c = sel->prev; c && !isvisible(c); c = c->prev); | ||
| 195 | if(!c) { | ||
| 196 | for(c = clients; c && c->next; c = c->next); | ||
| 197 | for(; c && !isvisible(c); c = c->prev); | ||
| 198 | } | ||
| 199 | if(c) { | ||
| 200 | focus(c); | ||
| 201 | restack(); | ||
| 202 | } | ||
| 203 | } | ||
| 204 | |||
| 205 | void | ||
| 206 | killclient(Arg *arg) { | 174 | killclient(Arg *arg) { |
| 207 | if(!sel) | 175 | if(!sel) |
| 208 | return; | 176 | return; |
| @@ -266,12 +234,6 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 266 | lt->arrange(); | 234 | lt->arrange(); |
| 267 | } | 235 | } |
| 268 | 236 | ||
| 269 | Client * | ||
| 270 | nexttiled(Client *c) { | ||
| 271 | for(; c && (c->isversatile || !isvisible(c)); c = c->next); | ||
| 272 | return c; | ||
| 273 | } | ||
| 274 | |||
| 275 | void | 237 | void |
| 276 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | 238 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { |
| 277 | float actual, dx, dy, max, min; | 239 | float actual, dx, dy, max, min; |
| @@ -341,6 +303,14 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | |||
| 341 | } | 303 | } |
| 342 | 304 | ||
| 343 | void | 305 | void |
| 306 | toggleversatile(Arg *arg) { | ||
| 307 | if(!sel || lt->arrange == versatile) | ||
| 308 | return; | ||
| 309 | sel->isversatile = !sel->isversatile; | ||
| 310 | lt->arrange(); | ||
| 311 | } | ||
| 312 | |||
| 313 | void | ||
| 344 | updatesizehints(Client *c) { | 314 | updatesizehints(Client *c) { |
| 345 | long msize; | 315 | long msize; |
| 346 | XSizeHints size; | 316 | XSizeHints size; |
