From 0c8d3a40840c800275d523e69319fba6ef669fa5 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Wed, 6 Dec 2017 16:46:08 +0200 Subject: [PATCH] Don't emit NotificationClosed signal on redisplayed notifications The signal_notification_closed function is called even when a notification has been pulled from history and re-emits the NotificationClosed signal, this can confuse clients since multiple such signals are not accounted for in the spec. --- src/queues.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/queues.c b/src/queues.c index 4e9c987..ed5d0f1 100644 --- a/src/queues.c +++ b/src/queues.c @@ -205,7 +205,9 @@ int queues_notification_close_id(int id, enum reason reason) } if (target) { - signal_notification_closed(target, reason); + //Don't notify clients if notification was pulled from history + if (!target->redisplayed) + signal_notification_closed(target, reason); queues_history_push(target); }