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
This commit is contained in:
Hajime Hoshi 2022-01-26 16:23:31 +09:00
parent 5ee493e85a
commit 8f1f9e3a5f

View File

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