From a02ad0a55577a735369040f0b9a02449dd34e3bd Mon Sep 17 00:00:00 2001 From: FelixKratz Date: Sat, 4 Sep 2021 17:19:35 +0200 Subject: [PATCH] hotfix for responsiveness --- src/bar.c | 5 ++--- src/message.c | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bar.c b/src/bar.c index a5dffbe..a9d79a4 100644 --- a/src/bar.c +++ b/src/bar.c @@ -193,11 +193,10 @@ void bar_refresh(struct bar *bar) { for (int i = 0; i < g_bar_manager.bar_item_count; i++) { struct bar_item* bar_item = g_bar_manager.bar_items[i]; - bar_item->is_shown = false; - if (!bar_item->drawing) continue; if(bar_item->associated_display > 0 && !(bar_item->associated_display & (1 << did))) continue; if(bar_item->associated_space > 0 && !(bar_item->associated_space & (1 << sid)) && (strcmp(bar_item->identifier, BAR_COMPONENT_SPACE) != 0)) continue; - + bar_item->is_shown = false; + if (!bar_item->drawing) continue; struct bar_line* label = &bar_item->label_line; struct bar_line* icon = &bar_item->icon_line; CGPoint icon_position = bar_align_line(bar, *icon, ALIGN_CENTER, ALIGN_CENTER); diff --git a/src/message.c b/src/message.c index cbc1616..854dba2 100644 --- a/src/message.c +++ b/src/message.c @@ -421,12 +421,10 @@ static void handle_domain_set(FILE* rsp, struct token domain, char* message) { struct token value = get_token(&message); bar_item->label_highlight = token_equals(value, ARGUMENT_COMMON_VAL_ON) ? true : false; bar_item_set_label(bar_item, bar_item->label); - bar_manager_refresh(&g_bar_manager); } else if (token_equals(property, COMMAND_SET_ICON_HIGHLIGHT)) { struct token value = get_token(&message); bar_item->icon_highlight = token_equals(value, ARGUMENT_COMMON_VAL_ON) ? true : false; bar_item_set_icon(bar_item, bar_item->icon); - bar_manager_refresh(&g_bar_manager); } // DEPRECATED else if (token_equals(property, COMMAND_SET_ENABLED)) {