Remove n->start tests

These aren't used anymore. Any notification which gets moved from
waiting to displayed, will have set the start field with the current
monotonic time.

So testing start == 0 won't ever succeed in
queues_notification_is_finished, as the tested notification is contained
in the displayed queue. So the start field never will be 0.

Also there's no semantics for start being 0 in dunst actually
implemented.
This commit is contained in:
Benedikt Heine 2018-11-20 17:06:23 +01:00
parent d96a29fed5
commit 93f6eb58a3

View File

@ -136,8 +136,6 @@ static bool queues_notification_is_finished(struct notification *n, struct dunst
if (n->timeout == 0) // sticky if (n->timeout == 0) // sticky
return false; return false;
if (n->start == 0) // hidden // TODO: is this really the implication of hidden?
return false;
bool is_idle = status.fullscreen ? false : status.idle; bool is_idle = status.fullscreen ? false : status.idle;
@ -344,7 +342,6 @@ void queues_history_pop(void)
struct notification *n = g_queue_pop_tail(history); struct notification *n = g_queue_pop_tail(history);
n->redisplayed = true; n->redisplayed = true;
n->start = 0;
n->timeout = settings.sticky_history ? 0 : n->timeout; n->timeout = settings.sticky_history ? 0 : n->timeout;
g_queue_insert_sorted(waiting, n, notification_cmp_data, NULL); g_queue_insert_sorted(waiting, n, notification_cmp_data, NULL);
} }