Fixed the resizing deadlock.

This commit is contained in:
Pietro Gagliardi 2014-02-13 11:42:21 -05:00
parent 5626b9e35c
commit a400ec6666
1 changed files with 7 additions and 4 deletions

View File

@ -51,10 +51,13 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
if r1 == 0 {
panic("GetClientRect failed: " + err.Error())
}
err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom))
if err != nil {
panic("child resize failed: " + err.Error())
}
// run the resize in a goroutine, since the WndProc is being run on uitask
go func() {
err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom))
if err != nil {
panic("child resize failed: " + err.Error())
}
}()
}
return 0
case _WM_CLOSE: