Closed dgerhardt closed 3 weeks ago
The outerPosition/outerSize methods of WebviewWindow (I've only tested the JS API) return inaccurate values for y on Linux/X11 and height on Windows.
outerPosition
outerSize
WebviewWindow
y
height
In both cases the deviation seems to be around the size of the title bar.
setPosition
setSize
Observed behavior: The WebviewWindows y (Linux) or height (Windows) values returned are larger than expected.
Reproduction repository: https://github.com/dgerhardt/tauri-app-inaccurate-outer-dimensions
outerPosition and outerSize should return accurate dimensions of the window.
tauri info
[✔] Environment - OS: Ubuntu 24.4.0 x86_64 (X64) ✔ webkit2gtk-4.1: 2.44.0 ✔ rsvg2: 2.58.0 ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09) ✔ cargo: 1.77.2 (e52e36006 2024-03-26) ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08) ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default) - node: 20.18.0 - yarn: 1.22.19 - npm: 10.8.2 [-] Packages - tauri 🦀: 2.0.6 - tauri-build 🦀: 2.0.2 - wry 🦀: 0.46.3 - tao 🦀: 0.30.5 - @tauri-apps/api : 2.0.3 - @tauri-apps/cli : 2.0.5 [-] Plugins - tauri-plugin-shell 🦀: 2.0.2 - @tauri-apps/plugin-shell : 2.0.1 [-] App - build-type: bundle - CSP: unset - frontendDist: ../dist - devUrl: http://localhost:1420/ - bundler: Vite
No response
Related issue: #11510
Closing for now. I'll wait for https://github.com/tauri-apps/tao/pull/1001 to be merged and will reopen if the issue on Windows remains.
Describe the bug
The
outerPosition
/outerSize
methods ofWebviewWindow
(I've only tested the JS API) return inaccurate values fory
on Linux/X11 andheight
on Windows.y
value is larger than expected. (there is already a fix: https://github.com/tauri-apps/tao/pull/1001)height
value is larger than expected.In both cases the deviation seems to be around the size of the title bar.
Reproduction
WebviewWindow
's dimensions usingouterPosition
andouterSize
JS API methods.WebviewWindow
's dimensions usingsetPosition
andsetSize
JS API methods.WebviewWindow
's dimensions again.Observed behavior: The
WebviewWindow
sy
(Linux) orheight
(Windows) values returned are larger than expected.Reproduction repository: https://github.com/dgerhardt/tauri-app-inaccurate-outer-dimensions
Expected behavior
outerPosition
andouterSize
should return accurate dimensions of the window.Full
tauri info
outputStack trace
No response
Additional context
Related issue: #11510