Fix resize event dimensions on Windows

This commit is contained in:
Trevor Slocum 2020-02-13 15:39:06 -08:00
parent de6819cc76
commit 2a8ba3160c
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,6 @@
v1.4.4 (WIP)
- Fix resize event dimensions on Windows
v1.4.3 (2020-02-13)
- Add SetFocusedFunc to TreeNode
- Add option to always show scroll bar

View File

@ -342,16 +342,17 @@ EventLoop:
a.lastResize = time.Now()
if screen == nil {
continue
}
screen.Sync()
// Call afterResize handler if there is one.
if a.afterResize != nil {
width, height := screen.Size()
a.afterResize(width, height)
}
if screen == nil {
continue
}
screen.Clear()
a.draw()
case *tcell.EventMouse:
atX, atY := event.Position()