Document foregroundTracker unavailable-state contract

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 12:23:54 -04:00
parent e1194be3c2
commit 7d62af0750
+2
View File
@@ -12,6 +12,8 @@ type foregroundTracker struct {
// changed reports whether (available, hwnd, title) differs from the last
// observation and records the new values. The first call always returns true.
// Callers pass the zero values (hwnd 0, title "") when available is false, so a
// steady "no foreground window" run does not re-emit.
func (t *foregroundTracker) changed(available bool, hwnd uintptr, title string) bool {
if t.primed && available == t.available && hwnd == t.hwnd && title == t.title {
return false