From cd2ef6771a7b83c8325801f987950ba58f49a97f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 8 Feb 2022 20:20:36 +0900 Subject: [PATCH] internal/ui: bug fix: a wrong monitor was used at setWindowPositionInDIP --- internal/ui/ui_glfw.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index 6e27f5652..a101ca828 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -1565,8 +1565,8 @@ func (u *UserInterface) setWindowPositionInDIP(x, y int, monitor *glfw.Monitor) // before the fullscreen, while window.GetSize() returns the desktop screen size in the fullscreen mode. if !u.isFullscreen() && runtime.GOOS == "darwin" { w, h := u.window.GetSize() - ww := int(u.dipFromGLFWPixel(float64(w), u.currentMonitor())) - wh := int(u.dipFromGLFWPixel(float64(h), u.currentMonitor())) + ww := int(u.dipFromGLFWPixel(float64(w), monitor)) + wh := int(u.dipFromGLFWPixel(float64(h), monitor)) u.setWindowSizeInDIP(ww, wh, u.isFullscreen()) } }