summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-10-04 12:38:31 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-10-04 12:45:16 +0200
commit5db1e994b71c5a88fda8b6a540e8acdbd2c78ccd (patch)
tree20a3cc1510fe8598c81aedda86c603c6b526a833
parentb81b0a54b61f62e09b0d3c0e96f51eb780658233 (diff)
downloadmpd-notification-5db1e994b71c5a88fda8b6a540e8acdbd2c78ccd.tar.gz
mpd-notification-5db1e994b71c5a88fda8b6a540e8acdbd2c78ccd.tar.zst
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.
-rw-r--r--mpd-notification.c4
1 files 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);