From b35ffa57b3bfaaf8fdc734c5d32b205165700e6e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 2 Dec 2019 01:06:55 +0900 Subject: [PATCH] Revert "uidriver/glfw: Remove the dirty hack for GLFW 3.2" This reverts commit d1da5b49203845f15578968758f9f45e9778f076. Reason: The dirty hack might still be needed. --- internal/uidriver/glfw/ui.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index ee6a5d1ef..fe6710c8c 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -995,6 +995,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 = invalidPos u.origPosY = invalidPos }