diff options
Diffstat (limited to 'swaybar/tray/dbus.c')
-rw-r--r-- | swaybar/tray/dbus.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swaybar/tray/dbus.c b/swaybar/tray/dbus.c index 8e719fd9..46a1c807 100644 --- a/swaybar/tray/dbus.c +++ b/swaybar/tray/dbus.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #define _XOPEN_SOURCE 700 | 1 | #define _XOPEN_SOURCE 700 |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <string.h> | ||
3 | #include <stdlib.h> | 4 | #include <stdlib.h> |
4 | #include <stdint.h> | 5 | #include <stdint.h> |
5 | #include <stdbool.h> | 6 | #include <stdbool.h> |
@@ -137,6 +138,13 @@ static void dispatch_status(DBusConnection *connection, DBusDispatchStatus new_s | |||
137 | 138 | ||
138 | /* Public functions below */ | 139 | /* Public functions below */ |
139 | 140 | ||
141 | bool dbus_message_iter_check_signature(DBusMessageIter *iter, const char *sig) { | ||
142 | char *msg_sig = dbus_message_iter_get_signature(iter); | ||
143 | int result = strcmp(msg_sig, sig); | ||
144 | dbus_free(msg_sig); | ||
145 | return (result == 0); | ||
146 | } | ||
147 | |||
140 | void dispatch_dbus() { | 148 | void dispatch_dbus() { |
141 | if (!should_dispatch || !conn) { | 149 | if (!should_dispatch || !conn) { |
142 | return; | 150 | return; |