widget: call draw() even if it's invisible
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
380750dd43
commit
86cb01685b
16
widget.c
16
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue