mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/ui: remove panic at (*glfwWindow).Maximize
Just doing nothing is more consistent with other functions. Updates #1990
This commit is contained in:
parent
4104abdf77
commit
85aabf734b
@ -113,10 +113,11 @@ func (w *glfwWindow) IsMaximized() bool {
|
|||||||
func (w *glfwWindow) Maximize() {
|
func (w *glfwWindow) Maximize() {
|
||||||
// Do not allow maximizing the window when the window is not resizable.
|
// Do not allow maximizing the window when the window is not resizable.
|
||||||
// On Windows, it is possible to restore the window from being maximized by mouse-dragging,
|
// On Windows, it is possible to restore the window from being maximized by mouse-dragging,
|
||||||
// and this can be an unexpected behavior.
|
// and this can be an unexpected behavior (#1990).
|
||||||
if w.ResizingMode() != WindowResizingModeEnabled {
|
if w.ResizingMode() != WindowResizingModeEnabled {
|
||||||
panic("ui: a window to maximize must be resizable")
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !w.ui.isRunning() {
|
if !w.ui.isRunning() {
|
||||||
w.ui.setInitWindowMaximized(true)
|
w.ui.setInitWindowMaximized(true)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user