aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2019-01-04 11:57:18 +0000
committerLibravatar Ian Fan <ianfan0@gmail.com>2019-01-08 12:18:59 +0000
commitd093c3ac55649e9a30504cfeaff506329ffd6ec7 (patch)
tree6ce91378ead75a72910744a1e694d33accc6215d /include/swaybar
parentswaybar: free the right item during tray destruction (diff)
downloadsway-d093c3ac55649e9a30504cfeaff506329ffd6ec7.tar.gz
sway-d093c3ac55649e9a30504cfeaff506329ffd6ec7.tar.zst
sway-d093c3ac55649e9a30504cfeaff506329ffd6ec7.zip
swaybar: handle SNI signals better
This fixes a crash caused by callbacks not matching the right sender, and frees old values later, before they are re-assigned.
Diffstat (limited to 'include/swaybar')
-rw-r--r--include/swaybar/tray/item.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/swaybar/tray/item.h b/include/swaybar/tray/item.h
index 9bba7951..4238bdb8 100644
--- a/include/swaybar/tray/item.h
+++ b/include/swaybar/tray/item.h
@@ -35,6 +35,10 @@ struct swaybar_sni {
35 bool item_is_menu; 35 bool item_is_menu;
36 char *menu; 36 char *menu;
37 char *icon_theme_path; // non-standard KDE property 37 char *icon_theme_path; // non-standard KDE property
38
39 sd_bus_slot *new_icon_slot;
40 sd_bus_slot *new_attention_icon_slot;
41 sd_bus_slot *new_status_slot;
38}; 42};
39 43
40struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray); 44struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray);