infobar: Fix infobar_draw_taglist

This commit is contained in:
Martin Duquesnoy 2008-12-03 16:45:16 +01:00
parent d875065df5
commit d39dbe658d
2 changed files with 13 additions and 11 deletions

View File

@ -372,12 +372,12 @@ client_manage(Window w, XWindowAttributes *wa)
mx += BORDH;
my += TBARH;
if(mx == 0)
if(!mx)
mx += BORDH;
else if(mx == MAXW)
mx -= wa->width + BORDH;
if(my == 0)
if(!my)
my += TBARH + INFOBARH;
else if(my == MAXH)
my -= wa->height + BORDH;

View File

@ -124,30 +124,32 @@ void
infobar_draw_taglist(int sc)
{
int i;
Client *c;
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);
barwin_refresh_color(infobar[sc].tags[i]);
/* Colorize a tag if there are clients in this */
for(c = clients; c; c = c->next)
{
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]);
}
}
if(tags[sc][i].name)
draw_text(infobar[sc].tags[i]->dr,
PAD / 2,
font->height,
((i == seltag[sc]) ? conf.colors.tagselfg : conf.colors.text),
0,
tags[sc][i].name);
draw_text(infobar[sc].tags[i]->dr,
PAD / 2,
font->height,
((i == seltag[sc]) ? conf.colors.tagselfg : conf.colors.text),
0,
tags[sc][i].name);
barwin_refresh(infobar[sc].tags[i]);
}