awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.37k stars 597 forks source link

Notification Icon isn't replaced #2851

Open SethBarberee opened 5 years ago

SethBarberee commented 5 years ago

@Elv13, sorry I keep hitting you with naughty bugs :smile:

Output of awesome --version:

awesome v4.3-350-ged091838 (Too long)
 • Compiled against Lua 5.3.5 (running with Lua 5.3)
 • D-Bus support: ✔
 • xcb-errors support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2

How to reproduce the issue:

Trigger a new notification that uses icons (used spotify since it shows album art on each new song) during when the first notifcation is displayed. The text is replaced but icon is not replaced.

NOTE: When first notification is destroyed, the icon is properly set. This does not happen when the first notification is still displayed.

Actual result:

Album Art (Icon) from first notification is still there while text is updated.

Expected result:

Album art (icon) for the recent notification should be the icon and properly replace just like the text.

SethBarberee commented 4 years ago

This has been fixed so closing this for now

actionless commented 4 years ago

i still can reproduce it in a bit more limited test case:

if content of the image file changes then setting notification.icon to the same filename doesn't update the icon

elenapan commented 4 years ago

if content of the image file changes then setting notification.icon to the same filename doesn't update the icon

As far as I know, imageboxes in general have this issue.

psychon commented 4 years ago

Should https://github.com/awesomeWM/awesome/blob/87928befe2dc981bfdbca59c0474c0ff5d39544f/lib/naughty/widget/icon.lua#L93 and https://github.com/awesomeWM/awesome/blob/87928befe2dc981bfdbca59c0474c0ff5d39544f/lib/naughty/widget/icon.lua#L160 use load_uncached_silently?

actionless commented 4 years ago

mb cache should check the filesize, not only filename?

psychon commented 4 years ago

mtime would be more sensible than filesize, I think

actionless commented 4 years ago

yup