mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 19:22:49 +01:00
uidriver/glfw: Bug fix: Call Maximize explictly instead of the hint
Fixes #1117
This commit is contained in:
parent
4fe5acd711
commit
34acf788d2
@ -662,12 +662,6 @@ func (u *UserInterface) run(context driver.UIContext) error {
|
|||||||
}
|
}
|
||||||
glfw.WindowHint(glfw.Floating, floating)
|
glfw.WindowHint(glfw.Floating, floating)
|
||||||
|
|
||||||
maximized := glfw.False
|
|
||||||
if u.isInitWindowMaximized() {
|
|
||||||
maximized = glfw.True
|
|
||||||
}
|
|
||||||
glfw.WindowHint(glfw.Maximized, maximized)
|
|
||||||
|
|
||||||
// Set the window visible explicitly or the application freezes on Wayland (#974).
|
// Set the window visible explicitly or the application freezes on Wayland (#974).
|
||||||
if os.Getenv("WAYLAND_DISPLAY") != "" {
|
if os.Getenv("WAYLAND_DISPLAY") != "" {
|
||||||
glfw.WindowHint(glfw.Visible, glfw.True)
|
glfw.WindowHint(glfw.Visible, glfw.True)
|
||||||
@ -691,6 +685,14 @@ func (u *UserInterface) run(context driver.UIContext) error {
|
|||||||
wh = int(u.toDeviceDependentPixel(float64(wh)))
|
wh = int(u.toDeviceDependentPixel(float64(wh)))
|
||||||
u.setWindowSize(ww, wh, u.isFullscreen(), u.vsync)
|
u.setWindowSize(ww, wh, u.isFullscreen(), u.vsync)
|
||||||
|
|
||||||
|
// Maximizing a window requires a proper size and position. Call Maximize here (#1117).
|
||||||
|
if u.isInitWindowMaximized() {
|
||||||
|
_ = u.t.Call(func() error {
|
||||||
|
u.window.Maximize()
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
_ = u.t.Call(func() error {
|
_ = u.t.Call(func() error {
|
||||||
u.title = u.getInitTitle()
|
u.title = u.getInitTitle()
|
||||||
u.window.SetTitle(u.title)
|
u.window.SetTitle(u.title)
|
||||||
|
Loading…
Reference in New Issue
Block a user