From d093c3ac55649e9a30504cfeaff506329ffd6ec7 Mon Sep 17 00:00:00 2001
From: Ian Fan <ianfan0@gmail.com>
Date: Fri, 4 Jan 2019 11:57:18 +0000
Subject: 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.
---
 include/swaybar/tray/item.h | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'include/swaybar')

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 {
 	bool item_is_menu;
 	char *menu;
 	char *icon_theme_path; // non-standard KDE property
+
+	sd_bus_slot *new_icon_slot;
+	sd_bus_slot *new_attention_icon_slot;
+	sd_bus_slot *new_status_slot;
 };
 
 struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray);
-- 
cgit v1.2.3