Block refresh for multi statusline per barwin

This commit is contained in:
Martin Duquesnoy 2012-02-06 11:40:04 +01:00
parent 95c3224ad4
commit c23615271a
3 changed files with 6 additions and 1 deletions

View File

@ -61,6 +61,7 @@ infobar_elem_tag_init(struct element *e)
e->geo.h -= (e->infobar->theme->tags_border_width << 1);
e->statusctx = &e->infobar->theme->tags_n_sl;
e->statusctx->flags |= STATUS_BLOCK_REFRESH;
if(SLIST_EMPTY(&e->bars) || (e->infobar->screen->flags & SCREEN_TAG_UPDATE))
{
@ -79,6 +80,7 @@ infobar_elem_tag_init(struct element *e)
/* Status doesn't have theme yet */
t->statusctx.theme = e->infobar->theme;
t->statusctx.flags |= STATUS_BLOCK_REFRESH;
/* Set border */
if(e->infobar->theme->tags_border_width)

View File

@ -453,7 +453,8 @@ status_render(struct status_ctx *ctx)
if(!ctx->status)
return;
barwin_refresh_color(ctx->barwin);
if(!(ctx->flags & STATUS_BLOCK_REFRESH))
barwin_refresh_color(ctx->barwin);
/* Use simple text instead sequence if no sequence found */
if(SLIST_EMPTY(&ctx->statushead))

View File

@ -113,6 +113,8 @@ struct status_ctx
{
struct barwin *barwin;
struct theme *theme;
#define STATUS_BLOCK_REFRESH 0x01
Flags flags;
char *status;
bool update;
SLIST_HEAD(, status_gcache) gcache;