mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
widget: optimize cache invalidation
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6bbbf03c95
commit
f28fac6107
1 changed files with 8 additions and 7 deletions
15
widget.c
15
widget.c
|
@ -235,15 +235,16 @@ widget_invalidate_bywidget(widget_t *widget)
|
|||
for(statusbar = globalconf.screens[screen].statusbar;
|
||||
statusbar;
|
||||
statusbar = statusbar->next)
|
||||
for(witer = statusbar->widgets; witer; witer = witer->next)
|
||||
if(witer->widget == widget)
|
||||
{
|
||||
statusbar->need_update = true;
|
||||
break;
|
||||
}
|
||||
if(!statusbar->need_update)
|
||||
for(witer = statusbar->widgets; witer; witer = witer->next)
|
||||
if(witer->widget == widget)
|
||||
{
|
||||
statusbar->need_update = true;
|
||||
break;
|
||||
}
|
||||
|
||||
for(c = globalconf.clients; c; c = c->next)
|
||||
if(c->titlebar)
|
||||
if(c->titlebar && !c->titlebar->need_update)
|
||||
for(witer = c->titlebar->widgets; witer; witer = witer->next)
|
||||
if(witer->widget == widget)
|
||||
c->titlebar->need_update = true;
|
||||
|
|
Loading…
Reference in a new issue