mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-21 04:49:10 +02:00
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.
15 lines
516 B
Go
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() })
|
|
}
|