mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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)
|
||||
|
||||
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).
|
||||
if os.Getenv("WAYLAND_DISPLAY") != "" {
|
||||
glfw.WindowHint(glfw.Visible, glfw.True)
|
||||
@ -691,6 +685,14 @@ func (u *UserInterface) run(context driver.UIContext) error {
|
||||
wh = int(u.toDeviceDependentPixel(float64(wh)))
|
||||
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.title = u.getInitTitle()
|
||||
u.window.SetTitle(u.title)
|
||||
|
Loading…
Reference in New Issue
Block a user