Skip to content

Tray icon invisible on Wayland (GtkStatusIcon); AppIndicator/SNI fix works #30

Description

@mtb-xt

While packaging FlooCast for the AUR I ran into a tray problem on Wayland that I think affects most modern Linux desktops, so I wanted to write it up (and I have a fix that's been working well if you're interested).

The problem

FlooCastTaskBarIcon is a wx.adv.TaskBarIcon, which on GTK is backed by the old GtkStatusIcon / _NET_SYSTEM_TRAY mechanism. That's a no-op under Wayland — GNOME dropped it years ago, and KDE only shows it via a legacy X11 shim. So on a normal Wayland session the tray icon simply never appears.

That turns "Minimize to System Tray" into a trap: the window hides, but there's no icon to click to get it back, and relaunching from the app menu just starts a second process that can't reach the dongle (it's already open).

What works

I switched the tray over to pystray with its AppIndicator backend, which speaks the StatusNotifierItem D-Bus protocol that GNOME (with the AppIndicator extension), KDE, and most others actually render today. The nice part is it can reuse wx's existing GLib main context via run_detached(), so there's no second event loop to babysit — menu clicks just come back through wx.CallAfter. I've been running it on KDE Plasma Wayland and the icon shows up and restores the window reliably.

I kept the change small and behind the same FlooCastTaskBarIcon interface. Happy to open a PR against a branch if you'd like to take a look — it'd need python-pystray (+ the AppIndicator/AyatanaAppIndicator GI typelib) as a dependency on Linux. Totally understand if you'd rather handle the Wayland tray your own way; mostly wanted the issue on record either way. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions