diff options
author | Ian Fan <ianfan0@gmail.com> | 2020-03-09 11:09:25 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-30 17:31:00 +0200 |
commit | 65501f0e467efa5e5b5ac01ef098971489b2b8c9 (patch) | |
tree | 950e0644894076b22a421ed50817409f782998a0 /include/swaybar/tray | |
parent | 68f53cd509af8812562d743a55128a1b341247f5 (diff) |
tray: track SNI callbacks
This removes any pending messages once the item is destroyed.
Furthermore, this installs SNI event calbacks asynchronously
in order to prevent sd-bus from bypassing pending messages.
Diffstat (limited to 'include/swaybar/tray')
-rw-r--r-- | include/swaybar/tray/item.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/swaybar/tray/item.h b/include/swaybar/tray/item.h index 5ffd8363..c02a5582 100644 --- a/include/swaybar/tray/item.h +++ b/include/swaybar/tray/item.h @@ -14,6 +14,15 @@ struct swaybar_pixmap { unsigned char pixels[]; }; +struct swaybar_sni_slot { + struct wl_list link; // swaybar_sni::slots + struct swaybar_sni *sni; + const char *prop; + const char *type; + void *dest; + sd_bus_slot *slot; +}; + struct swaybar_sni { // icon properties struct swaybar_tray *tray; @@ -37,9 +46,7 @@ struct swaybar_sni { 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 wl_list slots; // swaybar_sni_slot::link }; struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray); |