ui: Bug fix: Call SetPos multiple times to render correctly (#703)

This commit is contained in:
Hajime Hoshi 2018-10-08 00:25:21 +09:00
parent e0d2d5e753
commit fb7a3f2736

View File

@ -742,6 +742,12 @@ func (u *userInterface) forceSetScreenSize(width, height int, scale float64, ful
x := u.origPosX
y := u.origPosY
u.window.SetPos(x, y)
// Dirty hack for macOS (#703). Rendering doesn't work correctly with one SetPos, but work
// with two or more SetPos.
if runtime.GOOS == "darwin" {
u.window.SetPos(x+1, y)
u.window.SetPos(x, y)
}
u.origPosX = -1
u.origPosY = -1
}