notify: Use the application ID if available to set the fallback app name

This commit is contained in:
Marco Trevisan (Treviño) 2022-04-25 22:14:22 +02:00
parent e05030875e
commit 1da6996491
1 changed files with 8 additions and 0 deletions

View File

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