Closed solomongrundy6 closed 1 year ago
To make things easier, could you share the images you're using to test with? And are you using the full path including the file extension when passing it to notify-send
?
Okay, now I'm very confused. Firstly, I'm not using the full path, notify-send won't show the icon if you do that. (It will default to the generic notify-send icon in both places.)
But secondly, I posted one of the images that exhibits the bug, and just as a test I redownloaded it to a different filename. When invoking the newly saved image with notify-send, raven doesn't exhibit the bug. However, if I diff the newly saved image with the old one, they are exactly the same, yet one exhibits the bug and the other doesn't. They also have the same permissions, and are in the same directory. I then tried renaming the file, and when renamed it works fine.
I tested more PNGs in my icons directory, and most of them work fine. It occurred to me that I used to have a .desktop file in .local/share/applications named the same as one of the PNGs that don't work, so as an experiment I renamed the broken one to 'Firefox' and tried again - the notification showed the PNG image, but raven showed Firefox's actual icon. So now I think the problem has to do with how raven is looking up the icon - it's looking for the requesting application's default icon rather than just reusing the given image directly. But other PNGs that do work have never had an associated application and work fine - only the one the used to have an associated .desktop (but no longer does) is broken.
Maybe there's some cache somewhere that's out of date and telling raven that it has an application when it doesn't? The streamlink-twitch-gui icon also being broken in the same way doesn't entirely jibe with that though, it has an associated .desktop file and application but exhibits the same bug.
So I was doing more tinkering around, and renaming images to see if there was any commonality among the broken ones, and (except for streamlink-twitch-gui's app-generated notification) I think it's only affecting images with a capital letter in their filename. Maybe the streamlink-twitch-gui case is a different problem specific to that app, and the capital letter thing is the actual bug.
Yes, I'm fairly confident that's the problem now. It's not limited to PNGs at all. New reproduction steps with a distro-included icon:
First, copy an icon that is known to be good to .local/share/icons:
cp /usr/share/icons/Papirus/symbolic/status/battery-good-symbolic.svg ~/.local/share/icons/capitalbugtest.svg
Try it out, and see that it works:
notify-send --icon=capitalbugtest asdfasdf
Rename it to include a capital letter:
mv ~/.local/share/icons/capitalbugtest.svg ~/.local/share/icons/Capitalbugtest.svg
Try it out, and see that it's broken:
notify-send --icon=Capitalbugtest asdfasdf
According to the freedesktop icon standard, icons should only use lowercase letters, so this is apparently expected behavior. Feel free to close this if you want (unless you want to bother debugging the streamlink-twitch-gui notification exhibiting similar behavior, but that might be best left to the streamlink-twitch-gui issues instead). Either way, thanks for inadvertently helping me figure out what was causing this.
For what it's worth, this did just lead me to do a bit of cleanup on the Raven notification view code heh. We got all the details of the notification per the spec (including the image), but Raven didn't use it and just did its own thing, so that probably didn't help. Let's leave this open until changes are merged.
I'm still seeing similar behavior after updating to 10.8.1, in fact, it seems to happen a lot more now, even including notifications from some system apps. I don't think my naming of icons is the cause this time, some of the broken icons are the ones that are sent as a data stream over dbus instead of referencing a file somewhere on the system.
Description
Sometimes when displaying notifications, Raven will show the broken image placeholder instead of the actual icon the notification used.
example screenshot
My example below to reproduce uses notify-send, but I've also seen it in a few apps, including streamlink-twitch-gui. (Go to settings, notifications, and click on 'test notification')
I should note that the notification itself shows the correct icon, the broken icon image is only in Raven's widget for missed notifications. It also does not appear to be a directory permissions issue. I think that Raven may simply not be able to show PNG icons correctly there, SVG icons placed in .local/share/icons or /usr/share/icons seem to work correctly but PNGs in those directories do not.
Budgie version
10.8
Operating System
Solus 4.4
Steps to reproduce the issue
Works correctly:
notify-send test
notify-send --icon=volume-low test
notify-send --icon=<SVG icon in ~/.local/share/icons> test
Works incorrectly:
notify-send --icon=<PNG icon in ~/.local/share/icons or /usr/share/icons> test
Actual result
example screenshot
Expected result
correctly shows notification icon
Additional information
none