updates=when_shown respected more consitently

This commit is contained in:
Felix Kratz 2021-12-02 19:23:31 +01:00
parent a8c112ccb8
commit 3a12d250eb
2 changed files with 2 additions and 2 deletions

View file

@ -144,7 +144,7 @@ bool bar_item_update(struct bar_item* bar_item, char* sender, bool forced) {
bool scheduled_update_needed = bar_item->update_frequency <= bar_item->counter;
bool should_update = bar_item->updates_only_when_shown ? bar_item_is_shown(bar_item) : true;
if (((scheduled_update_needed) && should_update) || sender || forced) {
if (((scheduled_update_needed || sender) && should_update) || forced) {
bar_item->counter = 0;
// Script Update

View file

@ -283,7 +283,7 @@ void bar_manager_update_alias_components(struct bar_manager* bar_manager, bool f
void bar_manager_update_space_components(struct bar_manager* bar_manager, bool forced) {
for (int i = 0; i < bar_manager->bar_item_count; i++) {
struct bar_item* bar_item = bar_manager->bar_items[i];
if ((!bar_item_is_shown(bar_item) && !forced) || bar_item->type != BAR_COMPONENT_SPACE) continue;
if (bar_item->type != BAR_COMPONENT_SPACE) continue;
for (int j = 0; j < bar_manager->bar_count; j++) {
struct bar* bar = bar_manager->bars[j];