diff --git a/go.mod b/go.mod index d3c371ef..da371635 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/fredbi/uri v1.1.0 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fyne-io/gl-js v0.0.0-20230506162202-1fdaa286a934 // indirect - github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a // indirect + github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0 // indirect github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964 // indirect github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 // indirect github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect diff --git a/go.sum b/go.sum index c2c78ea1..cefd98cd 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/ github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fyne-io/gl-js v0.0.0-20230506162202-1fdaa286a934 h1:dZC5aKobSN07hf71oMivxUmAofFja5GrfPK2rBlttX4= github.com/fyne-io/gl-js v0.0.0-20230506162202-1fdaa286a934/go.mod h1:d4clgH0/GrRwWjRzJJQXxT/h1TyuNSfF/X64zb/3Ggg= -github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a h1:ybgRdYvAHTn93HW79bLiBiJwVL4jVeyGQRZMgImoeWs= -github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a/go.mod h1:gsGA2dotD4v0SR6PmPCYvS9JuOeMwAtmfvDE7mbYXMY= +github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0 h1:/1YRWFv9bAWkoo3SuxpFfzpXH0D/bQnTjNXyF4ih7Os= +github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0/go.mod h1:gsGA2dotD4v0SR6PmPCYvS9JuOeMwAtmfvDE7mbYXMY= github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964 h1:0pTELtjlVAVGSazfwRNcqTVzqmkWb1GsNozCmmZfdZA= github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964/go.mod h1:J9Uunu842kOcTjzQj4Eq8XIDmF55szvT1PTS1cUb1UE= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= diff --git a/vendor/github.com/fyne-io/glfw-js/browser_wasm.go b/vendor/github.com/fyne-io/glfw-js/browser_wasm.go index e2b7e312..3b23fd29 100644 --- a/vendor/github.com/fyne-io/glfw-js/browser_wasm.go +++ b/vendor/github.com/fyne-io/glfw-js/browser_wasm.go @@ -53,8 +53,11 @@ func CreateWindow(_, _ int, title string, monitor *Monitor, share *Window) (*Win canvas.Set("width", int(float64(width)*devicePixelRatio+0.5)) // Nearest non-negative int. canvas.Set("height", int(float64(height)*devicePixelRatio+0.5)) // Nearest non-negative int. + // Use dvw and dvh if supported; otherwise, fall back to vw and vh. canvas.Get("style").Call("setProperty", "width", "100vw") + canvas.Get("style").Call("setProperty", "width", "100dvw") canvas.Get("style").Call("setProperty", "height", "100vh") + canvas.Get("style").Call("setProperty", "height", "100dvh") document.Set("title", title) diff --git a/vendor/modules.txt b/vendor/modules.txt index bae9b9c4..123fa842 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -68,7 +68,7 @@ github.com/fsnotify/fsnotify/internal # github.com/fyne-io/gl-js v0.0.0-20230506162202-1fdaa286a934 ## explicit; go 1.14 github.com/fyne-io/gl-js -# github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a +# github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0 ## explicit; go 1.19 github.com/fyne-io/glfw-js # github.com/fyne-io/image v0.0.0-20240417123036-dc0ee9e7c964