internal/ui: forbid maximizing window when a window size is limited

Closes #2258
This commit is contained in:
Hajime Hoshi 2022-08-20 22:24:08 +09:00
parent e150745598
commit 31141d5112

View File

@ -119,6 +119,11 @@ func (w *glfwWindow) Maximize() {
return return
} }
minw, minh, maxw, maxh := w.ui.getWindowSizeLimitsInDIP()
if minw != glfw.DontCare || minh != glfw.DontCare || maxw != glfw.DontCare || maxh != glfw.DontCare {
return
}
if !w.ui.isRunning() { if !w.ui.isRunning() {
w.ui.setInitWindowMaximized(true) w.ui.setInitWindowMaximized(true)
return return