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.
This commit is contained in:
Marco Trevisan (Treviño) 2022-04-28 01:06:58 +02:00
parent a674e610ee
commit 1fba04bc03
1 changed files with 5 additions and 0 deletions

View File

@ -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;