diff options
author | 2017-10-27 13:17:54 -0600 | |
---|---|---|
committer | 2017-12-29 12:11:51 -0700 | |
commit | 3137f32711b3df2a650b4a686a601e3bf11f930a (patch) | |
tree | a45f3a9c6aa9083bcb832a6915cbdc266bbfbd58 /swaybar/tray/tray.c | |
parent | Improve Icon Theme Implimentation (diff) | |
download | sway-3137f32711b3df2a650b4a686a601e3bf11f930a.tar.gz sway-3137f32711b3df2a650b4a686a601e3bf11f930a.tar.zst sway-3137f32711b3df2a650b4a686a601e3bf11f930a.zip |
Allow correct item to get icon updates
Diffstat (limited to 'swaybar/tray/tray.c')
-rw-r--r-- | swaybar/tray/tray.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/swaybar/tray/tray.c b/swaybar/tray/tray.c index a95b29fd..e926faae 100644 --- a/swaybar/tray/tray.c +++ b/swaybar/tray/tray.c | |||
@@ -276,11 +276,17 @@ static DBusHandlerResult signal_handler(DBusConnection *connection, | |||
276 | "NewIcon") || dbus_message_is_signal(message, | 276 | "NewIcon") || dbus_message_is_signal(message, |
277 | "org.kde.StatusNotifierItem", "NewIcon")) { | 277 | "org.kde.StatusNotifierItem", "NewIcon")) { |
278 | const char *name; | 278 | const char *name; |
279 | const char *obj_path; | ||
279 | int index; | 280 | int index; |
280 | struct StatusNotifierItem *item; | 281 | struct StatusNotifierItem *item; |
281 | 282 | ||
282 | name = dbus_message_get_sender(message); | 283 | name = dbus_message_get_sender(message); |
283 | if ((index = list_seq_find(tray->items, sni_uniq_cmp, name)) != -1) { | 284 | obj_path = dbus_message_get_path(message); |
285 | struct ObjName obj_name = { | ||
286 | obj_path, | ||
287 | name, | ||
288 | }; | ||
289 | if ((index = list_seq_find(tray->items, sni_obj_name_cmp, &obj_name)) != -1) { | ||
284 | item = tray->items->items[index]; | 290 | item = tray->items->items[index]; |
285 | sway_log(L_INFO, "NewIcon signal from item %s", item->name); | 291 | sway_log(L_INFO, "NewIcon signal from item %s", item->name); |
286 | get_icon(item); | 292 | get_icon(item); |