mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/ui: bug fix: an undecorated window should reach the top of the screen
Closes #3118
This commit is contained in:
parent
2ef823ccd2
commit
8b0c930c2d
@ -115,6 +115,15 @@ func (u *UserInterface) adjustWindowPosition(x, y int, monitor *Monitor) (int, i
|
||||
return x, y, nil
|
||||
}
|
||||
|
||||
// If a window is not decorated, the window should be able to reach the top of the screen (#3118).
|
||||
d, err := u.window.GetAttrib(glfw.Decorated)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
if d == glfw.False {
|
||||
return x, y, nil
|
||||
}
|
||||
|
||||
mx := monitor.boundsInGLFWPixels.Min.X
|
||||
my := monitor.boundsInGLFWPixels.Min.Y
|
||||
// As the video width/height might be wrong,
|
||||
|
Loading…
Reference in New Issue
Block a user