#3044·polybar

[Bug]: internal/tray is not rendering properly changes in tray icons

Author: agorglCreated Nov 16, 2023Updated Sep 27, 2026
Labelsbugneeds confirmation

Checklist

  • I have read the appropriate section in the contributing guidelines
  • I believe this issue is a problem with polybar itself and not a misconfiguration on my part
  • I have searched for other open and closed issues that may have already reported this problem
  • I have checked the known issues page for this problem.
  • I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

polybar -r main

Minimal config

dosini
[bar/main]
width = 100%
module-margin-left = 2
module-margin-right = 0
modules-right = time tray

[module/tray]
type = internal/tray
format-offset = 0px
format-margin = 0px
format-padding = 0px
tray-padding = 0px
tray-spacing = 8px

Polybar log

No response

Expected behavior

When tray icons rerender, their previous icons should not show beneath

Actual behavior

Garbled tray icons on programs with tray icons that change

Window Manager and Version

bspwm

Linux Distribution

Arch

Polybar version

polybar 3.7.0

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/polybar/src=/usr/src/debug/polybar -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override  -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override

Additional Context / Screenshots

Tray icon before some action: image

Tray icon on/after the loading action: image