Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Scaling Tauri webview window on windows 11 #11364

Open
daedel opened this issue Oct 14, 2024 · 1 comment
Open

[bug] Scaling Tauri webview window on windows 11 #11364

daedel opened this issue Oct 14, 2024 · 1 comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@daedel
Copy link

daedel commented Oct 14, 2024

Describe the bug

On windows 11 Tauri webview window size is not the same as define in config.

Size in tauri config: 715x505
When I run app on my client's windows 11 pc, tauri window has size around 590x400. Looks like problem with scaling on that machine. When running app on windows 10 (different pc) its working good. On macos its working good.
Im running on windows applicaiton builded on GH actions (target windows-latest)

Im not sure if thats the reason but found that there was a bug on windows webview2 -> MicrosoftEdge/WebView2Feedback#1700

Currently my workaround for that is checking size on of react container and resizing window if size is less than definied in config.

I was trying:

  • to change scale on windows 11 - still not work
  • change resolution - not work
  • disconected external monitor and run on laptop's screen - not work

Reproduction

Run application with window size 715x505 on windows 11.

Expected behavior

Tauri window should be the same as in tauri.config.json

Full tauri info output

[⚠] Environment
    - OS: Mac OS 14.3.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06) (Homebrew)
    ✔ cargo: 1.80.1
    ⚠ rustup: not installed!
      If you have rust installed some other way, we recommend uninstalling it
      then use rustup instead. Visit https://rustup.rs/
    ⚠ Rust toolchain: couldn't be detected!
      Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
    - node: 20.10.0
    - pnpm: 9.1.1
    - yarn: 1.22.22
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.6.6
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6 (outdated, latest: 2.0.2)
    - @tauri-apps/cli [NPM]: 1.5.14 (outdated, latest: 1.6.3)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

Discord support post: https://discord.com/channels/616186924390023171/1294718226109956160

@daedel daedel added status: needs triage This issue needs to triage, applied to new issues type: bug labels Oct 14, 2024
@ahqsoftwares
Copy link
Contributor

The issue seems to be fixed in the microsoft's part, so my wild guess is enabling GdiScaling in wry's part will fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants