internal/ui: bug fix: ebiten.WindowSize() returned (1,1) when iconified

This commit is contained in:
Hajime Hoshi 2022-04-10 16:50:47 +09:00
parent aae866350a
commit 3fe1df8b3b

View File

@ -759,6 +759,9 @@ func (u *userInterfaceImpl) registerWindowFramebufferSizeCallback() {
if u.isFullscreen() { if u.isFullscreen() {
return return
} }
if u.window.GetAttrib(glfw.Iconified) == glfw.True {
return
}
// The framebuffer size is always scaled by the device scale factor (#1975). // The framebuffer size is always scaled by the device scale factor (#1975).
// See also the implementation in uiContext.updateOffscreen. // See also the implementation in uiContext.updateOffscreen.