From 9dbff2cddde3a241d059f01ee798bc995ddbd145 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 20 Sep 2021 21:01:17 +0900 Subject: [PATCH] internal/uidriver/glfw: Make SetFullscreen more responsive on macOS --- internal/uidriver/glfw/ui_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/uidriver/glfw/ui_darwin.go b/internal/uidriver/glfw/ui_darwin.go index 2cc21e193..39585fa86 100644 --- a/internal/uidriver/glfw/ui_darwin.go +++ b/internal/uidriver/glfw/ui_darwin.go @@ -183,7 +183,7 @@ func (u *UserInterface) isNativeFullscreenAvailable() bool { func (u *UserInterface) setNativeFullscreen(fullscreen bool) { // Toggling fullscreen might ignore events like keyUp. Ensure that events are fired. - glfw.WaitEventsTimeout(1) + glfw.WaitEventsTimeout(0.1) C.setNativeFullscreen(C.uintptr_t(u.window.GetCocoaWindow()), C.bool(fullscreen)) }