tauri
tauri copied to clipboard
[bug] The window size is incorrect under multiple monitors
Describe the bug
I now have two monitors, the primary screen is 1920x1080 with a dpi of 1.25 and the secondary screen is 1024x768 with a dpi of 1. Windows multi-window mode is set to extended.
I registered a global shortcut in my application to create a window at the mouse location, and set a fixed window size value using .inner_size
when creating the window, which, if I understand correctly, this should be the logical size, so no matter which screen I create the window on, they should look the same size, but this is not the case:
When I create a window on the secondary screen, the size of the window is larger, but when I create a window on the primary screen and drag it to the secondary screen, the window size is correct, even when I create a window on the secondary screen, Drag it to the main screen and drag it back, the size of the window will become correct.
Reproduction
No response
Expected behavior
No response
Platform and versions
Environment
› OS: Windows 10.0.22621 X64
› Webview2: 112.0.1722.64
› MSVC:
› Node.js: 19.5.0
› npm: 9.3.1
› pnpm: 8.4.0
› yarn: Not installed!
› rustup: 1.25.2
› rustc: 1.67.0
› cargo: 1.67.0
› Rust toolchain: stable-x86_64-pc-windows-gnu
Packages
› @tauri-apps/cli [NPM]: 1.2.3
Stack trace
No response
Additional context
https://user-images.githubusercontent.com/59004461/235893229-a5af8661-f46a-47e9-b1de-b0be0576d96d.mp4