mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
uidriver/glfw: Bug fix: Initializing order mattered
Especially on Linux, the window size and the window position must be initialized in this order. Fixes #1118
This commit is contained in:
parent
34acf788d2
commit
e628350d4e
@ -679,11 +679,13 @@ func (u *UserInterface) run(context driver.UIContext) error {
|
||||
return err
|
||||
}
|
||||
|
||||
u.iwindow.SetPosition(u.getInitWindowPosition())
|
||||
// Set the window size and the window position in this order.
|
||||
// This is necessary especially on Linux (#1118).
|
||||
ww, wh := u.getInitWindowSize()
|
||||
ww = int(u.toDeviceDependentPixel(float64(ww)))
|
||||
wh = int(u.toDeviceDependentPixel(float64(wh)))
|
||||
u.setWindowSize(ww, wh, u.isFullscreen(), u.vsync)
|
||||
u.iwindow.SetPosition(u.getInitWindowPosition())
|
||||
|
||||
// Maximizing a window requires a proper size and position. Call Maximize here (#1117).
|
||||
if u.isInitWindowMaximized() {
|
||||
|
Loading…
Reference in New Issue
Block a user