diff options
Diffstat (limited to 'sway/config/bar.c')
-rw-r--r-- | sway/config/bar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index 701bf051..b1aa2313 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c | |||
@@ -81,6 +81,12 @@ void free_bar_config(struct bar_config *bar) { | |||
81 | #if HAVE_TRAY | 81 | #if HAVE_TRAY |
82 | list_free_items_and_destroy(bar->tray_outputs); | 82 | list_free_items_and_destroy(bar->tray_outputs); |
83 | free(bar->icon_theme); | 83 | free(bar->icon_theme); |
84 | |||
85 | struct tray_binding *tray_bind = NULL, *tmp_tray_bind = NULL; | ||
86 | wl_list_for_each_safe(tray_bind, tmp_tray_bind, &bar->tray_bindings, link) { | ||
87 | wl_list_remove(&tray_bind->link); | ||
88 | free(tray_bind); | ||
89 | } | ||
84 | #endif | 90 | #endif |
85 | free(bar); | 91 | free(bar); |
86 | } | 92 | } |
@@ -174,6 +180,7 @@ struct bar_config *default_bar_config(void) { | |||
174 | 180 | ||
175 | #if HAVE_TRAY | 181 | #if HAVE_TRAY |
176 | bar->tray_padding = 2; | 182 | bar->tray_padding = 2; |
183 | wl_list_init(&bar->tray_bindings); | ||
177 | #endif | 184 | #endif |
178 | 185 | ||
179 | list_add(config->bars, bar); | 186 | list_add(config->bars, bar); |