diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-25 22:14:22 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-04-25 22:23:40 +0200 |
commit | 1da69964917570a206a886ac6a165f5d42754252 (patch) | |
tree | e2bc272243c2756206aabda61a1fa2c10a229a5f | |
parent | e05030875e9312de661bd9c3ca461ded09a98eb1 (diff) | |
download | libnotify-1da69964917570a206a886ac6a165f5d42754252.tar.gz |
notify: Use the application ID if available to set the fallback app name
-rw-r--r-- | libnotify/notify.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) |