mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
internal/ui: bug fix: needed to wait before entering into fullscreen
Just after moving a window to another monitor, waiting a little while was required before entering into fullscreen. Closes #2778
This commit is contained in:
parent
4ef98b3ea9
commit
7664647ad1
@ -315,6 +315,9 @@ func (u *userInterfaceImpl) setWindowMonitor(monitor *Monitor) {
|
||||
u.window.SetPos(x+px, y+py)
|
||||
|
||||
if fullscreen {
|
||||
// Calling setFullscreen immediately might not work well, especially on Linux (#2778).
|
||||
// Just wait a little bit. 1/30[s] seems enough in most cases.
|
||||
time.Sleep(time.Second / 30)
|
||||
u.setFullscreen(true)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user