From 8f1f9e3a5f73dcb933ebc85a7c61b2be999a0801 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 26 Jan 2022 16:23:31 +0900 Subject: [PATCH] internal/uidriver/glfw: do not set the window size on fullscreen The window size and the framebuffer size of fullscreen doesn't match. Updates #1960 --- internal/uidriver/glfw/ui.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 1506673c7..7656fdda4 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -827,6 +827,10 @@ event: // manager), glfw sends a framebuffer size callback which we need to handle (#1960). // This event is the only way to handle the size change at least on i3 window manager. u.defaultFramebufferSizeCallback = glfw.ToFramebufferSizeCallback(func(_ *glfw.Window, w, h int) { + if u.isFullscreen() { + return + } + // The framebuffer size is always scaled by the device scale factor (#1975). // See also the implementation in uiContext.updateOffscreen. s := u.deviceScaleFactor(u.currentMonitor())