diff --git a/application.go b/application.go index 667d9df..9f376a6 100644 --- a/application.go +++ b/application.go @@ -166,13 +166,14 @@ func (a *Application) Run() error { } } case *tcell.EventResize: + a.Lock() + screen := a.screen if a.rootAutoSize && a.root != nil { - a.Lock() - width, height := a.screen.Size() + width, height := screen.Size() a.root.SetRect(0, 0, width, height) - a.Unlock() - a.Draw() } + a.Unlock() + screen.Clear() a.Draw() } }