Fixes bug where Debian system tray settings are not persisted after a restart (#40104)

Resolves #36526

Set static system tray title to avoid system tray settings not
persisting across process restarts on Debian.
This commit is contained in:
Juan Fernandez 2026-02-19 13:13:30 -04:00 committed by GitHub
parent c3e71779f9
commit 39b0d5b507
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1 @@
* Added a system tray title to Fleet Desktop to make sure that the system tray ID is static, not dynamic.

View file

@ -172,6 +172,15 @@ func main() {
systray.SetTooltip("Fleet Desktop")
if runtime.GOOS == "linux" {
// Set a static title to ensure a consistent System Tray ID across
// process restarts. By default, fyne.io/systray generates a dynamic
// ID using the process PID if the title is not set, which prevents
// the OS from persisting user settings (like 'Always Hidden' or 'Pinned')
// between sessions on Debian.
systray.SetTitle("Fleet Desktop")
}
// Default to dark theme icon because this seems to be a better fit on Linux (Ubuntu at
// least). On macOS this is used as a template icon anyway.
systray.SetTemplateIcon(iconDark, iconDark)