From fa0abaf7cfecf1dc433717d53379d6942226c2bb Mon Sep 17 00:00:00 2001 From: Konstantin Pospelov Date: Sat, 8 Jun 2019 18:11:32 +0300 Subject: swaybar: do not retry search for tray icons In case a tray icon cannot be found or does not have a desirable size, swaybar retries the search again and again, which increases load on disk and CPU. This commit solves it by storing target_size for each icon, so that swaybar does not search for an icon of some size if it already tried to. Fixes #3789. --- include/swaybar/tray/item.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/swaybar/tray') diff --git a/include/swaybar/tray/item.h b/include/swaybar/tray/item.h index 4238bdb8..5ffd8363 100644 --- a/include/swaybar/tray/item.h +++ b/include/swaybar/tray/item.h @@ -20,6 +20,7 @@ struct swaybar_sni { cairo_surface_t *icon; int min_size; int max_size; + int target_size; // dbus properties char *watcher_id; -- cgit v1.2.3-54-g00ecf