mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +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
|
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
|
mx := monitor.boundsInGLFWPixels.Min.X
|
||||||
my := monitor.boundsInGLFWPixels.Min.Y
|
my := monitor.boundsInGLFWPixels.Min.Y
|
||||||
// As the video width/height might be wrong,
|
// As the video width/height might be wrong,
|
||||||
|
Loading…
Reference in New Issue
Block a user