mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
tray: tidy code
This includes some refactoring and fixing a small memory leak.
This commit is contained in:
parent
9d2a1efa0a
commit
e435d384ac
4 changed files with 17 additions and 28 deletions
|
|
@ -416,10 +416,6 @@ static void reload_sni(struct swaybar_sni *sni, char *icon_theme,
|
|||
icon_name, target_size, icon_theme,
|
||||
&sni->min_size, &sni->max_size);
|
||||
list_free(icon_search_paths);
|
||||
if (!icon_path && sni->icon_theme_path) {
|
||||
icon_path = find_icon_in_dir(icon_name, sni->icon_theme_path,
|
||||
&sni->min_size, &sni->max_size);
|
||||
}
|
||||
if (icon_path) {
|
||||
cairo_surface_destroy(sni->icon);
|
||||
sni->icon = load_background_image(icon_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue