From 93f6eb58a3857a0ef4980f7fcea44563a22c6060 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Tue, 20 Nov 2018 17:06:23 +0100 Subject: [PATCH] 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. --- src/queues.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/queues.c b/src/queues.c index 09303cd..2d47172 100644 --- a/src/queues.c +++ b/src/queues.c @@ -136,8 +136,6 @@ static bool queues_notification_is_finished(struct notification *n, struct dunst if (n->timeout == 0) // sticky 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; @@ -344,7 +342,6 @@ void queues_history_pop(void) struct notification *n = g_queue_pop_tail(history); n->redisplayed = true; - n->start = 0; n->timeout = settings.sticky_history ? 0 : n->timeout; g_queue_insert_sorted(waiting, n, notification_cmp_data, NULL); }