use sel instead of seeking the list
This commit is contained in:
parent
c853d5e9bb
commit
6e0ce46365
12
dwm.c
12
dwm.c
@ -481,19 +481,17 @@ detachstack(Client *c) {
|
|||||||
void
|
void
|
||||||
drawbar(void) {
|
drawbar(void) {
|
||||||
int i, x;
|
int i, x;
|
||||||
Client *c;
|
|
||||||
|
|
||||||
dc.x = 0;
|
dc.x = 0;
|
||||||
for(c = stack; c && c->isbanned; c = c->snext);
|
|
||||||
for(i = 0; i < LENGTH(tags); i++) {
|
for(i = 0; i < LENGTH(tags); i++) {
|
||||||
dc.w = TEXTW(tags[i]);
|
dc.w = TEXTW(tags[i]);
|
||||||
if(tagset[seltags] & 1 << i) {
|
if(tagset[seltags] & 1 << i) {
|
||||||
drawtext(tags[i], dc.sel, isurgent(i));
|
drawtext(tags[i], dc.sel, isurgent(i));
|
||||||
drawsquare(c && c->tags & 1 << i, isoccupied(i), isurgent(i), dc.sel);
|
drawsquare(sel && sel->tags & 1 << i, isoccupied(i), isurgent(i), dc.sel);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
drawtext(tags[i], dc.norm, isurgent(i));
|
drawtext(tags[i], dc.norm, isurgent(i));
|
||||||
drawsquare(c && c->tags & 1 << i, isoccupied(i), isurgent(i), dc.norm);
|
drawsquare(sel && sel->tags & 1 << i, isoccupied(i), isurgent(i), dc.norm);
|
||||||
}
|
}
|
||||||
dc.x += dc.w;
|
dc.x += dc.w;
|
||||||
}
|
}
|
||||||
@ -513,9 +511,9 @@ drawbar(void) {
|
|||||||
drawtext(stext, dc.norm, False);
|
drawtext(stext, dc.norm, False);
|
||||||
if((dc.w = dc.x - x) > bh) {
|
if((dc.w = dc.x - x) > bh) {
|
||||||
dc.x = x;
|
dc.x = x;
|
||||||
if(c) {
|
if(sel) {
|
||||||
drawtext(c->name, dc.sel, False);
|
drawtext(sel->name, dc.sel, False);
|
||||||
drawsquare(c->isfixed, c->isfloating, False, dc.sel);
|
drawsquare(sel->isfixed, sel->isfloating, False, dc.sel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
drawtext(NULL, dc.norm, False);
|
drawtext(NULL, dc.norm, False);
|
||||||
|
Loading…
Reference in New Issue
Block a user