aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-06-22 01:58:52 +0200
committerfiaxh <git@lightrise.org>2019-06-22 02:18:51 +0200
commitd429c3043241b35f52587a8bb8834b516117baa0 (patch)
treedaf38ac8875efcdd34d9c0808414f1d1d26bcda9 /main/src
parentfa43581ad3a72023377a216e6a93afc4fc473d38 (diff)
downloaddino-d429c3043241b35f52587a8bb8834b516117baa0.tar.gz
dino-d429c3043241b35f52587a8bb8834b516117baa0.zip
Don't set urgency hint on new messages on GNOME
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/notifications.vala7
1 files changed, 6 insertions, 1 deletions
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) {