From 5db1e994b71c5a88fda8b6a540e8acdbd2c78ccd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 4 Oct 2016 12:38:31 +0200 Subject: always set image Looks like libnotify does remember the image even if the notification is updated. So always set the image, it is cleared when called with NULL. --- mpd-notification.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpd-notification.c b/mpd-notification.c index 56dbaa2..0917270 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -375,8 +375,8 @@ int main(int argc, char ** argv) { notify_notification_update(notification, TEXT_TOPIC, notifystr, icon == NULL && pixbuf == NULL ? ICON_AUDIO_X_GENERIC : icon); - if (pixbuf != NULL) - notify_notification_set_image_from_pixbuf(notification, pixbuf); + /* Call this unconditionally! When pixbuf is NULL this clears old image. */ + notify_notification_set_image_from_pixbuf(notification, pixbuf); notify_notification_set_timeout(notification, notification_timeout); -- cgit v1.2.3-70-g09d2