internal/ui: bug fix: make inFrame concurrent-safe

Updates #1816
This commit is contained in:
Hajime Hoshi 2022-09-25 23:56:09 +09:00
parent 12f42544dd
commit 909f2fe492

View File

@ -728,11 +728,15 @@ func (u *userInterfaceImpl) createWindow(width, height int) error {
}
func (u *userInterfaceImpl) beginFrame() {
u.t.Call(func() {
u.inFrame = true
})
}
func (u *userInterfaceImpl) endFrame() {
u.t.Call(func() {
u.inFrame = false
})
}
// registerWindowSetSizeCallback must be called from the main thread.