mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/glfwwin: bug fix: do not allow maximizing window when the max size is specified
Closes #2289
This commit is contained in:
parent
9c177c1b8e
commit
7fab62158d
@ -28,7 +28,10 @@ func (w *Window) getWindowStyle() uint32 {
|
||||
if w.decorated {
|
||||
style |= _WS_CAPTION
|
||||
if w.resizable {
|
||||
style |= _WS_MAXIMIZEBOX | _WS_THICKFRAME
|
||||
style |= _WS_THICKFRAME
|
||||
if w.maxwidth == DontCare && w.maxheight == DontCare {
|
||||
style |= _WS_MAXIMIZEBOX
|
||||
}
|
||||
}
|
||||
} else {
|
||||
style |= _WS_POPUP
|
||||
|
@ -420,6 +420,11 @@ func (w *Window) SetSizeLimits(minwidth, minheight, maxwidth, maxheight int) err
|
||||
if err := w.platformSetWindowSizeLimits(minwidth, minheight, maxwidth, maxheight); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := w.updateWindowStyles(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user