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:
Hajime Hoshi 2023-09-23 19:02:34 +09:00
parent 4ef98b3ea9
commit 7664647ad1

View File

@ -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)
}
}