mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/uidriver/glfw: Bug fix: Do not call setWindowSize on iconifying
The window size might be 0 after iconifying. An iconified window is invisible to users so setting a window size doesn't make sense anyway. Closes #1585
This commit is contained in:
parent
26432dfc9e
commit
f5a4216434
@ -1347,9 +1347,8 @@ func (u *UserInterface) iconify() {
|
|||||||
}
|
}
|
||||||
u.window.Iconify()
|
u.window.Iconify()
|
||||||
|
|
||||||
// Call setWindowSize explicitly in order to update the rendering since the callback is unregistered now.
|
// After iconifiying, the window is invisible and setWindowSize doesn't have to be called.
|
||||||
w, h := u.window.GetSize()
|
// Rather, the window size might be (0, 0) and it might be impossible to call setWindowSize (#1585).
|
||||||
u.setWindowSize(w, h, u.isFullscreen())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) restore() {
|
func (u *UserInterface) restore() {
|
||||||
|
Loading…
Reference in New Issue
Block a user