From 0a03df297bbdfcba160e1e6f1bc162799a66d048 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 30 Dec 2022 15:21:12 +0900 Subject: [PATCH] internal/ui: make it explicit to call swapBuffers only w/ OpenGL --- internal/ui/ui_glfw.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index f2179871c..5a07dd6d8 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -1224,8 +1224,10 @@ func (u *userInterfaceImpl) setFullscreen(fullscreen bool) { // Adjust the window size later (after adjusting the position). } else if !u.isNativeFullscreenAvailable() && u.window.GetMonitor() != nil { u.window.SetMonitor(nil, 0, 0, ww, wh, 0) - glfw.PollEvents() - u.swapBuffers() + if u.graphicsDriver.IsGL() { + glfw.PollEvents() + u.swapBuffers() + } } // glfw.PollEvents is necessary for macOS to enable (*glfw.Window).SetPos and SetSize (#2296).