dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Flickering caused by age seconds

Open beelze opened this issue 1 year ago • 5 comments

dunst 1.9.2, cinnamon, Gentoo

Changing age every second causing flickering sometimes (especially when high number of notification are displayed). As far as I understand, that is because of changing length of XYm YYs old string, like 10m 59s11m 0s, 15m 9s15m 10s and so on.

Notification height may change this moment, causing redraw of notification itself and moving other notifications up and down. I believe this issue can be fixed by suppressing seconds in age string after some (configurable) age. For instance, 20m old instead of 20m 15s old may be enough in most scenarios. Something like short_age_after=<time> configurable option. Consider this as FR please.

beelze avatar Dec 12 '23 09:12 beelze

Is the problem that when the time string gets too long the layout is skewed and everything is shifted below, thus causing a total redraw?

bynect avatar Dec 18 '23 21:12 bynect

Yes. Indicating the age of notification is a good idea, but implementing this by adding variable string to notification body is controversial.

beelze avatar Dec 18 '23 22:12 beelze

Yes. Indicating the age of notification is a good idea, but implementing this by adding variable string to notification body is controversial.

Maybe we can use a fixed length template so that redraws at most will change text layout but not notification size

bynect avatar Dec 20 '23 10:12 bynect

Maybe we can use a fixed length template so that redraws at most will change text layout but not notification size

Surely it will solve the most of the issue

beelze avatar Dec 20 '23 16:12 beelze

The issue is that dunst is flickering on redraw. This is probably not so easy to solve on X11, but should not happen on wayland. It can be mitigated with not updating every second after a while. I would be fine with just showing the number of minutes after the notification is more than a minute old

fwsmit avatar Jan 14 '24 11:01 fwsmit