ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.29k stars 62 forks source link

[Bug] Replaced notifications flicker #306

Closed LeadSeason closed 1 year ago

LeadSeason commented 1 year ago

Describe the bug Replacing notifications causes notification to flicker in the panel.

To Reproduce I have made simple notification with a loading bar. should be able to be copy and pasted in to a bash / zsh terminal session.

counter=0                              
counter_limit=500
while [ "$counter" != "$counter_limit" ]; do
        percent=$(($counter*100/$counter_limit))
        notify-send -t 200 -r 1 -h int:value:$percent "$percent% example loading notification"
        counter=$((counter+1))
        sleep 0.1
done

Expected behavior Pretty self explanatory. Also from the specification:

The server must atomically (ie with no flicker or other visual cues) replace the given notification

Please provide logs if you're experiencing notification errors / bugs https://gist.github.com/LeadSeason/ebfa03c9cb91e48afb2f34f5257dd12a

Screenshots

https://github.com/ErikReider/SwayNotificationCenter/assets/60569772/fe563786-6435-47b5-a4de-3587d600e04a

Desktop (please complete the following information):

Additional context Specification says to use a incrementing counter for the replacement ID but this seems to not work. Unsure if this is me interpreting the specification wrong.