From 02e3cb99870a423522bf05818f40a36b34f94430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Fri, 29 May 2026 14:56:49 +0200 Subject: [PATCH] ui: document why startStatusNotifierWatcher is empty on non-Linux Explain that macOS/Windows have a native tray and the SNI+XEmbed bridge is Linux-WM-only, so the body is intentionally empty to let main.go call it unconditionally across all build targets. --- client/ui/tray_watcher_other.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/client/ui/tray_watcher_other.go b/client/ui/tray_watcher_other.go index aa8fc8ac7..23adc6d4d 100644 --- a/client/ui/tray_watcher_other.go +++ b/client/ui/tray_watcher_other.go @@ -2,5 +2,16 @@ package main -// startStatusNotifierWatcher is a no-op on non-Linux platforms. -func startStatusNotifierWatcher() {} +// startStatusNotifierWatcher is a no-op on non-Linux platforms (and on +// linux/386, which excludes the cgo XEmbed host). +// +// The in-process org.kde.StatusNotifierWatcher + XEmbed bridge in +// tray_watcher_linux.go only exists to rescue the tray on minimal Linux WMs +// that ship no SNI watcher of their own. macOS and Windows have a native +// system tray that Wails talks to directly, so there is nothing to register +// here — the function body is intentionally empty rather than missing so +// main.go can call startStatusNotifierWatcher() unconditionally across all +// build targets. +func startStatusNotifierWatcher() { + // Intentionally empty: see the doc comment above. +}