diff options
author | Ian Fan <ianfan0@gmail.com> | 2020-03-04 14:34:32 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-30 17:31:00 +0200 |
commit | 68f53cd509af8812562d743a55128a1b341247f5 (patch) | |
tree | 269042ba89e26b4124bb9f53cd9debf29e6f2599 /swaybar/tray/item.c | |
parent | tray: allow themes to inherit from multiple themes (diff) | |
download | sway-68f53cd509af8812562d743a55128a1b341247f5.tar.gz sway-68f53cd509af8812562d743a55128a1b341247f5.tar.zst sway-68f53cd509af8812562d743a55128a1b341247f5.zip |
tray: tidy code
This includes some refactoring and fixing a small memory leak.
Diffstat (limited to 'swaybar/tray/item.c')
-rw-r--r-- | swaybar/tray/item.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index b4238417..63578cd9 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c | |||
@@ -416,10 +416,6 @@ static void reload_sni(struct swaybar_sni *sni, char *icon_theme, | |||
416 | icon_name, target_size, icon_theme, | 416 | icon_name, target_size, icon_theme, |
417 | &sni->min_size, &sni->max_size); | 417 | &sni->min_size, &sni->max_size); |
418 | list_free(icon_search_paths); | 418 | list_free(icon_search_paths); |
419 | if (!icon_path && sni->icon_theme_path) { | ||
420 | icon_path = find_icon_in_dir(icon_name, sni->icon_theme_path, | ||
421 | &sni->min_size, &sni->max_size); | ||
422 | } | ||
423 | if (icon_path) { | 419 | if (icon_path) { |
424 | cairo_surface_destroy(sni->icon); | 420 | cairo_surface_destroy(sni->icon); |
425 | sni->icon = load_background_image(icon_path); | 421 | sni->icon = load_background_image(icon_path); |