From 4b452510ba1e4fa551c50e9c27661662046caf8b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 10 Aug 2008 15:40:25 +0200 Subject: [PATCH] taglist: append area even if function fails Signed-off-by: Julien Danjou --- widgets/taglist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/taglist.c b/widgets/taglist.c index 5930d16e..7dfcdfea 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -114,6 +114,7 @@ taglist_draw(draw_context_t *ctx, int screen, widget_node_t *w, for(int i = 0; i < tags->len; i++) { tag_t *tag = tags->tab[i]; + p_clear(&area, 1); luaA_tag_userdata_new(globalconf.L, tag); if(luaA_dofunction(globalconf.L, data->label, 1, 1)) @@ -132,9 +133,8 @@ taglist_draw(draw_context_t *ctx, int screen, widget_node_t *w, pdata[i].bg_resize ? ((double) pdata[i].bg_image->width / (double) pdata[i].bg_image->height) * w->area.height : pdata[i].bg_image->width); w->area.width += area.width; - - area_array_append(&tda->areas, area); } + area_array_append(&tda->areas, area); } /* Now that we have widget width we can compute widget x coordinate */