Files
netbird/client/ui/tray_click_windows.go
T
Zoltan Papp edf7e2d04d Tighten verbose comments in Wails UI Go code
Shorten over-long godoc/inline comments across the client/ui tray and
services code: drop narrative restatement, legacy-Fyne tangents, and text
already evident from signatures and names. Keep only the non-obvious why
(concurrency/lock ordering, platform quirks, ordering constraints, the
profile-switch state table). No code changes.
2026-06-13 00:22:27 +02:00

15 lines
516 B
Go

//go:build windows
package main
// bindTrayClick wires the tray icon's click handlers on Windows.
//
// Wails v3's Windows systray leaves left-click a no-op (only right-click opens
// the menu), so bind OnClick to OpenMenu to match macOS/Linux. The macOS freeze
// that blocks OnClick→OpenMenu doesn't apply here: openMenu() is the same
// menu.ShowAt() path right-click already uses.
func bindTrayClick(t *Tray) {
t.tray.OnClick(func() { t.tray.OpenMenu() })
t.tray.OnDoubleClick(func() { t.ShowWindow() })
}