aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2019-09-05 09:23:54 -0400
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-08-20 14:38:04 +0200
commitd1b76b9aa5330cc27a0f3ecefc57becfbe8ea02e (patch)
treed78b204585881551081cfc9a003ca6e0047ff39e /src
parent8f195248f8b7ca0cc6c87c02188c4ed360964143 (diff)
downloadayatana-indicator-notifications-d1b76b9aa5330cc27a0f3ecefc57becfbe8ea02e.tar.gz
ayatana-indicator-notifications-d1b76b9aa5330cc27a0f3ecefc57becfbe8ea02e.tar.bz2
ayatana-indicator-notifications-d1b76b9aa5330cc27a0f3ecefc57becfbe8ea02e.zip
Discard notifications when indicator is hidden.
Diffstat (limited to 'src')
-rw-r--r--src/indicator-notifications.c6
1 files changed, 6 insertions, 0 deletions
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);