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
10
widget.c
10
widget.c
|
@ -154,16 +154,20 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_
|
||||||
draw_rectangle(ctx, rectangle, 1.0, true, &ctx->bg);
|
draw_rectangle(ctx, rectangle, 1.0, true, &ctx->bg);
|
||||||
|
|
||||||
for(w = wnode; w; w = w->next)
|
for(w = wnode; w; w = w->next)
|
||||||
if(w->widget->isvisible && w->widget->align == AlignLeft)
|
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);
|
left += w->widget->draw(ctx, screen, w, left, (left + right), object, type);
|
||||||
|
|
||||||
/* renders right widget from last to first */
|
/* renders right widget from last to first */
|
||||||
for(w = *widget_node_list_last(&wnode); w; w = w->prev)
|
for(w = *widget_node_list_last(&wnode); w; w = w->prev)
|
||||||
if(w->widget->isvisible && w->widget->align == AlignRight)
|
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);
|
right += w->widget->draw(ctx, screen, w, right, (left + right), object, type);
|
||||||
|
|
||||||
for(w = wnode; w; w = w->next)
|
for(w = wnode; w; w = w->next)
|
||||||
if(w->widget->isvisible && w->widget->align == AlignFlex)
|
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);
|
left += w->widget->draw(ctx, screen, w, left, (left + right), object, type);
|
||||||
|
|
||||||
switch(position)
|
switch(position)
|
||||||
|
|
Loading…
Reference in New Issue