From fb7a3f273672b0fc715bf5fbe4c78afdef7ac220 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 8 Oct 2018 00:25:21 +0900 Subject: [PATCH] ui: Bug fix: Call SetPos multiple times to render correctly (#703) --- internal/ui/ui_glfw.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index b71d66b43..2ab5dcdb1 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -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 }