mirror of https://github.com/rivo/tview.git
A resize event should have the screen cleared before redrawing. Fixes #19
This commit is contained in:
parent
cc7bb29944
commit
4153189e1b
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue