From 83cbc1182d5ded13d6b00c6517a528886a694f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 14 Apr 2016 18:31:02 +0200 Subject: [PATCH] LibnotifyNotification: use "append" when supported This behavior can be overridden by just providing unique tags to notifications --- brightray/browser/linux/libnotify_notification.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/brightray/browser/linux/libnotify_notification.cc b/brightray/browser/linux/libnotify_notification.cc index 6772588f5099..6314bd650f2a 100644 --- a/brightray/browser/linux/libnotify_notification.cc +++ b/brightray/browser/linux/libnotify_notification.cc @@ -121,6 +121,16 @@ void LibnotifyNotification::Show(const base::string16& title, g_object_set(G_OBJECT(notification_), "id", id, NULL); } + // Always try to append notifications. + // Unique tags can be used to prevent this. + if (HasCapability("append")) { + libnotify_loader_.notify_notification_set_hint_string( + notification_, "append", "true"); + } else if (HasCapability("x-canonical-append")) { + libnotify_loader_.notify_notification_set_hint_string( + notification_, "x-canonical-append", "true"); + } + GError* error = nullptr; libnotify_loader_.notify_notification_show(notification_, &error); if (error) {