diff --git a/dunst.c b/dunst.c index e604cd0..f8f0784 100644 --- a/dunst.c +++ b/dunst.c @@ -193,7 +193,7 @@ static int get_sleep_time(void) max_age = MAX(max_age, notification_get_age(n)); int ttl = notification_get_ttl(n); - if (ttl > 0) { + if (ttl >= 0) { if (have_ttl) { min_ttl = MIN(min_ttl, ttl); } else { diff --git a/notification.c b/notification.c index e3d3b47..10cbd11 100644 --- a/notification.c +++ b/notification.c @@ -520,7 +520,7 @@ void notification_update_text_to_render(notification *n) int notification_get_ttl(notification *n) { if (n->timeout == 0) { - return 0; + return -1; } else { return n->timeout - (time(NULL) - n->start); }