mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +01:00
gapplication: Initialize backend before withdrawing notifications
Make sure to initialize the notification backend in g_application_withdraw_notification() the same way as is done in g_application_send_notification(). This makes it possible for an app to withdraw notifications it has sent in a previous execution of the application. https://bugzilla.gnome.org/show_bug.cgi?id=750625
This commit is contained in:
parent
bb41a89c42
commit
c612fcab0f
@ -2715,7 +2715,9 @@ g_application_withdraw_notification (GApplication *application,
|
||||
g_return_if_fail (G_IS_APPLICATION (application));
|
||||
g_return_if_fail (id != NULL);
|
||||
|
||||
if (application->priv->notifications)
|
||||
if (application->priv->notifications == NULL)
|
||||
application->priv->notifications = g_notification_backend_new_default (application);
|
||||
|
||||
g_notification_backend_withdraw_notification (application->priv->notifications, id);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user