From f2860bebed8ea0d84cad00439d81b1b970db1a6a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 30 Mar 2022 02:48:35 +0900 Subject: [PATCH] internal/ui: remove an unnecessary hack to resize the window The bug (#1606) is no longer reproducible even without the hack. Updates #1606 Updates #1609 --- internal/ui/ui_glfw.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index 28dff5f33..8a886ed92 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -1550,20 +1550,6 @@ func (u *userInterfaceImpl) setWindowPositionInDIP(x, y int, monitor *glfw.Monit } else { u.window.SetPos(x, y) } - - // Call setWindowSize explicitly in order to update the rendering since the callback is disabled now. - // - // There are cases when setWindowSize should be called (#1606) and should not be called (#1609). - // For the former, macOS seems enough so far. - // - // Do not call setWindowSize in the fullscreen mode since setWindowSize requires the window size - // 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), monitor)) - wh := int(u.dipFromGLFWPixel(float64(h), monitor)) - u.setWindowSizeInDIP(ww, wh, u.isFullscreen()) - } } // setWindowTitle must be called from the main thread.