From d1b76b9aa5330cc27a0f3ecefc57becfbe8ea02e Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Thu, 5 Sep 2019 09:23:54 -0400 Subject: Discard notifications when indicator is hidden. --- src/indicator-notifications.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c index db53df7..2ab4083 100644 --- a/src/indicator-notifications.c +++ b/src/indicator-notifications.c @@ -805,6 +805,12 @@ message_received_cb(DBusSpy *spy, Notification *note, gpointer user_data) g_return_if_fail(IS_INDICATOR_NOTIFICATIONS(user_data)); IndicatorNotifications *self = INDICATOR_NOTIFICATIONS(user_data); + /* Discard notifications if we are hidden */ + if(self->priv->hide_indicator) { + g_object_unref(note); + return; + } + /* Discard useless notifications */ if(notification_is_private(note) || notification_is_empty(note)) { g_object_unref(note); -- cgit v1.2.3