5eef85f5cd1be18c1308f6726886bb9c61ff9601 — Elias Naur 1 year, 1 month ago 93409a7
ui/app: note that Window.Invalidate is safe for concurrent use

Invalidate is intended to be called as a result of external events,
which might very well be from a different goroutine than the one
driving the window.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 1 insertions(+), 0 deletions(-)

M ui/app/window.go
M ui/app/window.go => ui/app/window.go +1 -0
@@ 158,6 158,7 @@ func (w *Window) draw(size image.Point, frame *ui.Ops) {
// Invalidate the window such that a UpdateEvent will be generated
// immediately. If the window is inactive, the event is sent when the
// window becomes active.
// Invalidate is safe for concurrent use.
func (w *Window) Invalidate() {
	select {
	case w.invalidates <- struct{}{}: