From 93b4c0d9b17f7decd2cc0829c1236972f95ab4e6 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 8 Apr 2022 18:40:10 +0900 Subject: [PATCH] internal/ui: add comments Updates #1590 --- internal/ui/window_glfw.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/ui/window_glfw.go b/internal/ui/window_glfw.go index dad7fc359..1fb6d0cdd 100644 --- a/internal/ui/window_glfw.go +++ b/internal/ui/window_glfw.go @@ -201,6 +201,7 @@ func (w *Window) Size() (int, int) { } ww, wh := 0, 0 w.ui.t.Call(func() { + // Unlike origWindowPos, windowWidth/HeightInDPI is always updated via the callback. ww = w.ui.windowWidthInDIP wh = w.ui.windowHeightInDIP }) @@ -215,6 +216,7 @@ func (w *Window) SetSize(width, height int) { w.ui.t.Call(func() { // When a window is a native fullscreen, forcing to resize the window might leave unexpected image lags. // Forbid this. + // TODO: Remove this condition (#1590). if w.ui.isNativeFullscreen() { return }