diff options
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 42 |
1 files changed, 8 insertions, 34 deletions
| @@ -73,8 +73,8 @@ focusnext(Arg *arg) | |||
| 73 | if(sel->ismax) | 73 | if(sel->ismax) |
| 74 | togglemax(NULL); | 74 | togglemax(NULL); |
| 75 | 75 | ||
| 76 | if(!(c = getnext(sel->next, tsel))) | 76 | if(!(c = getnext(sel->next))) |
| 77 | c = getnext(clients, tsel); | 77 | c = getnext(clients); |
| 78 | if(c) { | 78 | if(c) { |
| 79 | higher(c); | 79 | higher(c); |
| 80 | focus(c); | 80 | focus(c); |
| @@ -260,36 +260,10 @@ manage(Window w, XWindowAttributes *wa) | |||
| 260 | arrange(NULL); | 260 | arrange(NULL); |
| 261 | 261 | ||
| 262 | /* mapping the window now prevents flicker */ | 262 | /* mapping the window now prevents flicker */ |
| 263 | if(c->tags[tsel]) { | 263 | XMapRaised(dpy, c->win); |
| 264 | XMapRaised(dpy, c->win); | 264 | XMapRaised(dpy, c->title); |
| 265 | XMapRaised(dpy, c->title); | 265 | if(c->tags[tsel]) |
| 266 | focus(c); | 266 | focus(c); |
| 267 | } | ||
| 268 | else { | ||
| 269 | XMapRaised(dpy, c->win); | ||
| 270 | XMapRaised(dpy, c->title); | ||
| 271 | |||
| 272 | } | ||
| 273 | } | ||
| 274 | |||
| 275 | void | ||
| 276 | pop(Client *c) | ||
| 277 | { | ||
| 278 | Client **l; | ||
| 279 | |||
| 280 | for(l = &clients; *l && *l != c; l = &(*l)->next); | ||
| 281 | if(c->prev) | ||
| 282 | c->prev->next = c->next; | ||
| 283 | if(c->next) | ||
| 284 | c->next->prev = c->prev; | ||
| 285 | *l = c->next; | ||
| 286 | |||
| 287 | c->prev = NULL; | ||
| 288 | if(clients) | ||
| 289 | clients->prev = c; | ||
| 290 | c->next = clients; | ||
| 291 | clients = c; | ||
| 292 | arrange(NULL); | ||
| 293 | } | 267 | } |
| 294 | 268 | ||
| 295 | void | 269 | void |
| @@ -457,7 +431,7 @@ unmanage(Client *c) | |||
| 457 | c->next->prev = c->prev; | 431 | c->next->prev = c->prev; |
| 458 | *l = c->next; | 432 | *l = c->next; |
| 459 | if(sel == c) { | 433 | if(sel == c) { |
| 460 | sel = getnext(c->next, tsel); | 434 | sel = getnext(c->next); |
| 461 | if(!sel) | 435 | if(!sel) |
| 462 | sel = getprev(c->prev); | 436 | sel = getprev(c->prev); |
| 463 | if(!sel) | 437 | if(!sel) |
| @@ -481,8 +455,8 @@ zoom(Arg *arg) | |||
| 481 | if(!sel) | 455 | if(!sel) |
| 482 | return; | 456 | return; |
| 483 | 457 | ||
| 484 | if(sel == getnext(clients, tsel) && sel->next) { | 458 | if(sel == getnext(clients) && sel->next) { |
| 485 | if((c = getnext(sel->next, tsel))) | 459 | if((c = getnext(sel->next))) |
| 486 | sel = c; | 460 | sel = c; |
| 487 | } | 461 | } |
| 488 | 462 | ||
