Document foregroundTracker unavailable-state contract
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ type foregroundTracker struct {
|
|||||||
|
|
||||||
// changed reports whether (available, hwnd, title) differs from the last
|
// changed reports whether (available, hwnd, title) differs from the last
|
||||||
// observation and records the new values. The first call always returns true.
|
// 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 {
|
func (t *foregroundTracker) changed(available bool, hwnd uintptr, title string) bool {
|
||||||
if t.primed && available == t.available && hwnd == t.hwnd && title == t.title {
|
if t.primed && available == t.available && hwnd == t.hwnd && title == t.title {
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user