diff --git a/orbit/changes/36526-fleet-desktop-does-not-stay-hidden b/orbit/changes/36526-fleet-desktop-does-not-stay-hidden new file mode 100644 index 0000000000..c247dad742 --- /dev/null +++ b/orbit/changes/36526-fleet-desktop-does-not-stay-hidden @@ -0,0 +1 @@ +* Added a system tray title to Fleet Desktop to make sure that the system tray ID is static, not dynamic. \ No newline at end of file diff --git a/orbit/cmd/desktop/desktop.go b/orbit/cmd/desktop/desktop.go index 93022ab397..4180c2fb01 100644 --- a/orbit/cmd/desktop/desktop.go +++ b/orbit/cmd/desktop/desktop.go @@ -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)