From 1da69964917570a206a886ac6a165f5d42754252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 25 Apr 2022 22:14:22 +0200 Subject: [PATCH] notify: Use the application ID if available to set the fallback app name --- libnotify/notify.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libnotify/notify.c b/libnotify/notify.c index bf7d89b..7f72972 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -151,6 +151,14 @@ notify_init (const char *app_name) if (_initted) return TRUE; +#ifdef GLIB_VERSION_2_32 + if (app_name == NULL && g_application_get_default ()) { + GApplication *application = g_application_get_default (); + + app_name = g_application_get_application_id (application); + } +#endif + notify_set_app_name (app_name); #if !GLIB_CHECK_VERSION (2, 36, 0)