mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 09:22:01 +01:00
internal/ui: allow maximizeWindow when no max boundaries are set (#2291)
Closes #2290
This commit is contained in:
parent
5781943833
commit
9c177c1b8e
@ -289,9 +289,9 @@ func (u *userInterfaceImpl) setWindowSizeLimitsInDIP(minw, minh, maxw, maxh int)
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *userInterfaceImpl) areWindowSizeLimitsSpecified() bool {
|
func (u *userInterfaceImpl) isWindowMaximizable() bool {
|
||||||
minw, minh, maxw, maxh := u.getWindowSizeLimitsInDIP()
|
_, _, maxw, maxh := u.getWindowSizeLimitsInDIP()
|
||||||
return minw != glfw.DontCare || minh != glfw.DontCare || maxw != glfw.DontCare || maxh != glfw.DontCare
|
return maxw == glfw.DontCare && maxh == glfw.DontCare
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *userInterfaceImpl) isInitFullscreen() bool {
|
func (u *userInterfaceImpl) isInitFullscreen() bool {
|
||||||
|
@ -119,7 +119,7 @@ func (w *glfwWindow) Maximize() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if w.ui.areWindowSizeLimitsSpecified() {
|
if !w.ui.isWindowMaximizable() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ func (w *glfwWindow) Minimize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *glfwWindow) Restore() {
|
func (w *glfwWindow) Restore() {
|
||||||
if w.ui.areWindowSizeLimitsSpecified() {
|
if !w.ui.isWindowMaximizable() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !w.ui.isRunning() {
|
if !w.ui.isRunning() {
|
||||||
|
Loading…
Reference in New Issue
Block a user