internal/uidriver/glfw: Use the window size on a native fullscreen

Updates #1745
This commit is contained in:
Hajime Hoshi 2021-09-19 00:13:53 +09:00
parent f0395dd329
commit 8ed55ef42d

View File

@ -936,7 +936,11 @@ func (u *UserInterface) updateSize() (float64, float64, bool) {
u.toChangeSize = false
var w, h float64
if u.isFullscreen() {
if u.isFullscreen() && !u.isNativeFullscreen() {
// On Linux, the window size is not reliable just after making the window
// fullscreened. Use the monitor size.
// On macOS's native fullscreen, the window's size returns a more precise size
// reflecting the adjustment of the view size (#1745).
m := currentMonitor(u.window)
v := m.GetVideoMode()
ww, wh := v.Width, v.Height