From d429c3043241b35f52587a8bb8834b516117baa0 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 22 Jun 2019 01:58:52 +0200 Subject: [PATCH] Don't set urgency hint on new messages on GNOME --- main/src/ui/notifications.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala index fe545154..78e8f47e 100644 --- a/main/src/ui/notifications.vala +++ b/main/src/ui/notifications.vala @@ -82,7 +82,12 @@ public class Notifications : Object { } catch (Error e) { } window.get_application().send_notification(conversation.id.to_string(), notifications[conversation]); active_conversation_ids.add(conversation.id.to_string()); - window.urgency_hint = true; + + // Don't set urgency hint in GNOME, produces "Window is active" notification + var desktop_env = Environment.get_variable("XDG_CURRENT_DESKTOP"); + if (desktop_env == null || !desktop_env.down().contains("gnome")) { + window.urgency_hint = true; + } } private async void notify_subscription_request(Conversation conversation) {