diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-28 01:06:58 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-28 01:06:58 +0200 |
commit | 1fba04bc032ad65bedf43e74c2d53121440613f4 (patch) | |
tree | 77d45a7f1a0855e4e9b36eaaf5b1cb481e570b93 | |
parent | a674e610ee4f5e4869d29ecd795025ef999f7d8f (diff) | |
download | libnotify-1fba04bc032ad65bedf43e74c2d53121440613f4.tar.gz |
notification: Include sender-pid hint by default if not provided
It's used by various daemons including GNOME Shell to figure out the
parent application.
-rw-r--r-- | libnotify/notification.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libnotify/notification.c b/libnotify/notification.c index 85f9d02..482ee3e 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -819,6 +819,11 @@ notify_notification_show (NotifyNotification *notification, g_variant_builder_add (&hints_builder, "{sv}", key, data); } + if (g_hash_table_lookup (priv->hints, "sender-pid") == NULL) { + g_variant_builder_add (&hints_builder, "{sv}", "sender-pid", + g_variant_new_int64 (getpid ())); + } + if (priv->snap_app && g_hash_table_lookup (priv->hints, "desktop-entry") == NULL) { gchar *snap_desktop; |