From e40268c3ca7c64f6f66345ba5b0753e1304b4718 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 23 Sep 2023 19:02:34 +0900 Subject: [PATCH] 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 --- internal/ui/ui_glfw.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index aa1bb0ddd..c5516a84b 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -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) } }