don't draw if we do not have space too

This commit is contained in:
Julien Danjou 2008-01-22 17:52:12 +01:00
parent 44aab9ff4b
commit b27208d9d1
1 changed files with 4 additions and 4 deletions

View File

@ -57,15 +57,15 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
int n = 0, i = 0, box_width = 0, icon_width = 0, box_width_rest = 0;
NetWMIcon *icon;
if(used >= widget->statusbar->width)
return (widget->area.width = 0);
for(c = globalconf.clients; c; c = c->next)
if(ISVISIBLE_ON_TB(c, widget->statusbar->screen, d->show_all))
n++;
if(!n)
{
widget->area.width = 0;
return widget->area.width;
}
return (widget->area.width = 0);
box_width = (widget->statusbar->width - used) / n;
/* compute how many pixel we left empty */