Some applications missing icon on Wayland

Under Wayland, some applications end up having a missing or broken icon. I have observed this on both Budgie Wayland using XFW, and the XFCE 4.20 pre-releases. Icons are retrieved correctly in both cases under X11. It happens both when using xfw_application_get_gicon() and xfw_application_get_icon(). I am running this all on Solus, and Joshua Stobl is also experiencing this on Fedora Rawhide.

image

Observed affected applications:

  • Zen browser (flatpak)
  • CLion (Jetbrains Toolbox)

I first thought that maybe it has to do with flatpak, or third-party distribution channels in general, but the Spotify flatpak icon works just fine, so it's not that simple.