infobar: Fix infobar_draw_taglist
This commit is contained in:
parent
d875065df5
commit
d39dbe658d
@ -372,12 +372,12 @@ client_manage(Window w, XWindowAttributes *wa)
|
|||||||
mx += BORDH;
|
mx += BORDH;
|
||||||
my += TBARH;
|
my += TBARH;
|
||||||
|
|
||||||
if(mx == 0)
|
if(!mx)
|
||||||
mx += BORDH;
|
mx += BORDH;
|
||||||
else if(mx == MAXW)
|
else if(mx == MAXW)
|
||||||
mx -= wa->width + BORDH;
|
mx -= wa->width + BORDH;
|
||||||
|
|
||||||
if(my == 0)
|
if(!my)
|
||||||
my += TBARH + INFOBARH;
|
my += TBARH + INFOBARH;
|
||||||
else if(my == MAXH)
|
else if(my == MAXH)
|
||||||
my -= wa->height + BORDH;
|
my -= wa->height + BORDH;
|
||||||
|
|||||||
@ -124,19 +124,21 @@ void
|
|||||||
infobar_draw_taglist(int sc)
|
infobar_draw_taglist(int sc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
Client *c;
|
||||||
|
|
||||||
for(i = 1; i < conf.ntag[sc] + 1; ++i)
|
for(i = 1; i < conf.ntag[sc] + 1; ++i)
|
||||||
{
|
{
|
||||||
Client *c;
|
|
||||||
|
|
||||||
infobar[sc].tags[i]->color = ((i == seltag[sc]) ? conf.colors.tagselbg : conf.colors.bar);
|
infobar[sc].tags[i]->color = ((i == seltag[sc]) ? conf.colors.tagselbg : conf.colors.bar);
|
||||||
barwin_refresh_color(infobar[sc].tags[i]);
|
barwin_refresh_color(infobar[sc].tags[i]);
|
||||||
|
|
||||||
|
/* Colorize a tag if there are clients in this */
|
||||||
for(c = clients; c; c = c->next)
|
for(c = clients; c; c = c->next)
|
||||||
{
|
{
|
||||||
if(c->screen == sc)
|
if(c->screen == sc)
|
||||||
{
|
{
|
||||||
infobar[sc].tags[c->tag]->color = ((c->tag == seltag[sc]) ? conf.colors.tagselbg : conf.colors.tag_occupied_bg);
|
infobar[sc].tags[c->tag]->color = ((c->tag == seltag[sc])
|
||||||
|
? conf.colors.tagselbg
|
||||||
|
: conf.colors.tag_occupied_bg);
|
||||||
barwin_refresh_color(infobar[sc].tags[i]);
|
barwin_refresh_color(infobar[sc].tags[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user