fix looping over hints
This commit is contained in:
parent
aceec39eb4
commit
e1596e8992
11
dunst_dbus.c
11
dunst_dbus.c
@ -242,9 +242,10 @@ notify(DBusMessage *dmsg) {
|
|||||||
|
|
||||||
|
|
||||||
dunst_printf(DEBUG, "extracting hints\n");
|
dunst_printf(DEBUG, "extracting hints\n");
|
||||||
do {
|
while (dbus_message_iter_get_arg_type(&hints) != DBUS_TYPE_INVALID) {
|
||||||
dbus_message_iter_recurse(&hints, &hint);
|
dbus_message_iter_recurse(&hints, &hint);
|
||||||
do {
|
printf("Type: %d\n", dbus_message_iter_get_arg_type(&hint));
|
||||||
|
while (dbus_message_iter_get_arg_type(&hint) != DBUS_TYPE_INVALID) {
|
||||||
if(dbus_message_iter_get_arg_type(&hint) != DBUS_TYPE_STRING) {
|
if(dbus_message_iter_get_arg_type(&hint) != DBUS_TYPE_STRING) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -252,8 +253,10 @@ notify(DBusMessage *dmsg) {
|
|||||||
_extract_hint("urgency", hint_name, &hint, &urgency);
|
_extract_hint("urgency", hint_name, &hint, &urgency);
|
||||||
_extract_hint("fgcolor", hint_name, &hint, &fgcolor);
|
_extract_hint("fgcolor", hint_name, &hint, &fgcolor);
|
||||||
_extract_hint("bgcolor", hint_name, &hint, &bgcolor);
|
_extract_hint("bgcolor", hint_name, &hint, &bgcolor);
|
||||||
} while(dbus_message_iter_next(&hint));
|
dbus_message_iter_next(&hint);
|
||||||
} while(dbus_message_iter_next(&hints));
|
}
|
||||||
|
dbus_message_iter_next(&hints);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(expires > 0) {
|
if(expires > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user