From 86cb01685b0fc2db0ee833eaa73e60ac744f8463 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 5 Aug 2008 14:19:29 +0200 Subject: [PATCH] widget: call draw() even if it's invisible Signed-off-by: Julien Danjou --- widget.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/widget.c b/widget.c index 0d50e669..d177bee8 100644 --- a/widget.c +++ b/widget.c @@ -154,17 +154,21 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_ draw_rectangle(ctx, rectangle, 1.0, true, &ctx->bg); for(w = wnode; w; w = w->next) - if(w->widget->isvisible && w->widget->align == AlignLeft) - left += w->widget->draw(ctx, screen, w, left, (left + right), object, type); + if(w->widget->align == AlignLeft) + /* special case: systray need to be called even if it's not visible */ + if(w->widget->isvisible || w->widget->type == systray_new) + left += w->widget->draw(ctx, screen, w, left, (left + right), object, type); /* renders right widget from last to first */ for(w = *widget_node_list_last(&wnode); w; w = w->prev) - if(w->widget->isvisible && w->widget->align == AlignRight) - right += w->widget->draw(ctx, screen, w, right, (left + right), object, type); + if(w->widget->align == AlignRight) + if(w->widget->isvisible || w->widget->type == systray_new) + right += w->widget->draw(ctx, screen, w, right, (left + right), object, type); for(w = wnode; w; w = w->next) - if(w->widget->isvisible && w->widget->align == AlignFlex) - left += w->widget->draw(ctx, screen, w, left, (left + right), object, type); + if(w->widget->align == AlignFlex) + if(w->widget->isvisible || w->widget->type == systray_new) + left += w->widget->draw(ctx, screen, w, left, (left + right), object, type); switch(position) {