| 145 |
145 |
|
Bool isoccupied(unsigned int t); |
| 146 |
146 |
|
Bool isprotodel(Client *c); |
| 147 |
147 |
|
Bool isurgent(unsigned int t); |
| 148 |
|
- |
Bool isvisible(Client *c, Bool *cmp); |
|
148 |
+ |
Bool isvisible(Client *c); |
| 149 |
149 |
|
void keypress(XEvent *e); |
| 150 |
150 |
|
void killclient(const char *arg); |
| 151 |
151 |
|
void manage(Window w, XWindowAttributes *wa); |
|
| 261 |
261 |
|
Client *c; |
| 262 |
262 |
|
|
| 263 |
263 |
|
for(c = clients; c; c = c->next) |
| 264 |
|
- |
if(isvisible(c, NULL)) { |
|
264 |
+ |
if(isvisible(c)) { |
| 265 |
265 |
|
unban(c); |
| 266 |
266 |
|
if(!lt->arrange || c->isfloating) |
| 267 |
267 |
|
resize(c, c->x, c->y, c->w, c->h, True); |
|
| 441 |
441 |
|
if((ev->value_mask & (CWX|CWY)) |
| 442 |
442 |
|
&& !(ev->value_mask & (CWWidth|CWHeight))) |
| 443 |
443 |
|
configure(c); |
| 444 |
|
- |
if(isvisible(c, NULL)) |
|
444 |
+ |
if(isvisible(c)) |
| 445 |
445 |
|
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); |
| 446 |
446 |
|
} |
| 447 |
447 |
|
else |
|
| 494 |
494 |
|
Client *c; |
| 495 |
495 |
|
|
| 496 |
496 |
|
dc.x = 0; |
| 497 |
|
- |
for(c = stack; c && !isvisible(c, NULL); c = c->snext); |
|
497 |
+ |
for(c = stack; c && !isvisible(c); c = c->snext); |
| 498 |
498 |
|
for(i = 0; i < LENGTH(tags); i++) { |
| 499 |
499 |
|
dc.w = textw(tags[i]); |
| 500 |
500 |
|
if(tagset[seltags][i]) { |
|
| 634 |
634 |
|
|
| 635 |
635 |
|
void |
| 636 |
636 |
|
focus(Client *c) { |
| 637 |
|
- |
if(!c || (c && !isvisible(c, NULL))) |
| 638 |
|
- |
for(c = stack; c && !isvisible(c, NULL); c = c->snext); |
|
637 |
+ |
if(!c || (c && !isvisible(c))) |
|
638 |
+ |
for(c = stack; c && !isvisible(c); c = c->snext); |
| 639 |
639 |
|
if(sel && sel != c) { |
| 640 |
640 |
|
grabbuttons(sel, False); |
| 641 |
641 |
|
XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); |
|
| 669 |
669 |
|
|
| 670 |
670 |
|
if(!sel) |
| 671 |
671 |
|
return; |
| 672 |
|
- |
for(c = sel->next; c && !isvisible(c, arg ? sel->tags : NULL); c = c->next); |
|
672 |
+ |
for(c = sel->next; c && !isvisible(c); c = c->next); |
| 673 |
673 |
|
if(!c) |
| 674 |
|
- |
for(c = clients; c && !isvisible(c, arg ? sel->tags : NULL); c = c->next); |
|
674 |
+ |
for(c = clients; c && !isvisible(c); c = c->next); |
| 675 |
675 |
|
if(c) { |
| 676 |
676 |
|
focus(c); |
| 677 |
677 |
|
restack(); |
|
| 684 |
684 |
|
|
| 685 |
685 |
|
if(!sel) |
| 686 |
686 |
|
return; |
| 687 |
|
- |
for(c = sel->prev; c && !isvisible(c, arg ? sel->tags : NULL); c = c->prev); |
|
687 |
+ |
for(c = sel->prev; c && !isvisible(c); c = c->prev); |
| 688 |
688 |
|
if(!c) { |
| 689 |
689 |
|
for(c = clients; c && c->next; c = c->next); |
| 690 |
|
- |
for(; c && !isvisible(c, arg ? sel->tags : NULL); c = c->prev); |
|
690 |
+ |
for(; c && !isvisible(c); c = c->prev); |
| 691 |
691 |
|
} |
| 692 |
692 |
|
if(c) { |
| 693 |
693 |
|
focus(c); |
|
| 888 |
888 |
|
} |
| 889 |
889 |
|
|
| 890 |
890 |
|
Bool |
| 891 |
|
- |
isvisible(Client *c, Bool *cmp) { |
|
891 |
+ |
isvisible(Client *c) { |
| 892 |
892 |
|
unsigned int i; |
| 893 |
893 |
|
|
| 894 |
|
- |
if(!cmp) |
| 895 |
|
- |
cmp = tagset[seltags]; |
| 896 |
894 |
|
for(i = 0; i < LENGTH(tags); i++) |
| 897 |
|
- |
if(c->tags[i] && cmp[i]) |
|
895 |
+ |
if(c->tags[i] && tagset[seltags][i]) |
| 898 |
896 |
|
return True; |
| 899 |
897 |
|
return False; |
| 900 |
898 |
|
} |
|
| 1019 |
1017 |
|
Client *c; |
| 1020 |
1018 |
|
|
| 1021 |
1019 |
|
for(c = clients; c; c = c->next) |
| 1022 |
|
- |
if(!c->isfloating && isvisible(c, NULL)) |
|
1020 |
+ |
if(!c->isfloating && isvisible(c)) |
| 1023 |
1021 |
|
resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, RESIZEHINTS); |
| 1024 |
1022 |
|
} |
| 1025 |
1023 |
|
|
|
| 1070 |
1068 |
|
|
| 1071 |
1069 |
|
Client * |
| 1072 |
1070 |
|
nextunfloating(Client *c) { |
| 1073 |
|
- |
for(; c && (c->isfloating || !isvisible(c, NULL)); c = c->next); |
|
1071 |
+ |
for(; c && (c->isfloating || !isvisible(c)); c = c->next); |
| 1074 |
1072 |
|
return c; |
| 1075 |
1073 |
|
} |
| 1076 |
1074 |
|
|
|
| 1230 |
1228 |
|
wc.stack_mode = Below; |
| 1231 |
1229 |
|
wc.sibling = barwin; |
| 1232 |
1230 |
|
for(c = stack; c; c = c->snext) |
| 1233 |
|
- |
if(!c->isfloating && isvisible(c, NULL)) { |
|
1231 |
+ |
if(!c->isfloating && isvisible(c)) { |
| 1234 |
1232 |
|
XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc); |
| 1235 |
1233 |
|
wc.sibling = c->win; |
| 1236 |
1234 |
|
} |