Custom() detects window close

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-14 22:14:02 -06:00
parent 784536b18a
commit de5f84717f
1 changed files with 5 additions and 0 deletions

5
new.go
View File

@ -1,6 +1,7 @@
package repostatus
import (
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
)
@ -18,5 +19,9 @@ func New(p *gui.Node, path string) *RepoStatus {
rs.window.Make()
rs.ready = true
rs.draw()
rs.window.Custom = func() {
rs.hidden = true
log.Warn("repostatus user closed the window()")
}
return rs
}