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] Slightly incorrect inner window size when using window shadows + decorations disabled on Windows #12285

Open
SpikeHD opened this issue Jan 7, 2025 · 1 comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@SpikeHD
Copy link
Contributor

SpikeHD commented Jan 7, 2025

Describe the bug

When displaying a window with shadows on and decorations off, the inner size of the window is slightly smaller than it needs to be, creating a black or white border on the bottom and right. See the following examples (you may have to look closely, lol):

No shadows, no decorations (fine) Shadows, decorations (fine) Shadows, no decorations (bugged)

Something I believe is related: when "Show the accent color on the following surfaces -> Title bars and window borders" is enabled (which I have set in the above screenshots, the problem persists even with the setting disabled), only the top and left borders show said color. This was partially fixed in tauri-apps/tao#997 so that too may have something to do with it.

Reproduction

WebviewWindowBuilder::new(app, "main", Url::parse("https://google.com/"))
    .resizable(true)
    .decorations(false)
    .shadow(true)
    .build()?;

(Set Google to dark mode to be able to see the right/bottom better)

Expected behavior

The black/white color on the right and bottom should not be there, and the accent color border should wrap all the way around all four sides (when enabled).

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.19045 x86_64 (X64)
    ✔ WebView2: 131.0.2903.112
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.11.0
    - pnpm: 9.5.0
    - yarn: 1.22.19
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.2.0      
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.1
    - tauri-cli 🦀: 2.0.0-beta.16
    - @tauri-apps/api : 2.0.0 (outdated, latest: 2.2.0)
    - @tauri-apps/cli : 2.0.0 (outdated, latest: 2.2.2)

[-] Plugins
    - tauri-plugin-process 🦀: 2.2.0
    - @tauri-apps/plugin-process : not installed!
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-single-instance 🦀: 2.2.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-window-state 🦀: 2.2.0
    - @tauri-apps/plugin-window-state : not installed!
    - tauri-plugin-http 🦀: 2.2.0
    - @tauri-apps/plugin-http : not installed!
    - tauri-plugin-autostart 🦀: 2.2.0
    - @tauri-apps/plugin-autostart : not installed!
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: https://discord.com/app
    - devUrl: https://discord.com/app
    - bundler: Vite

Stack trace

N/A

Additional context

SpikeHD/Dorion#268

@SpikeHD SpikeHD added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jan 7, 2025
@SpikeHD SpikeHD changed the title [bug] Slightly incorrect inner window size when using window shadows + decorations disabbled on Windows [bug] Slightly incorrect inner window size when using window shadows + decorations disabled on Windows Jan 7, 2025
@FabianLars
Copy link
Member

Something I believe is related: when "Show the accent color on the following surfaces -> Title bars and window borders" is enabled (which I have set in the above screenshots, the problem persists even with the setting disabled), only the top and left borders show said color.

#11654

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

No branches or pull requests

2 participants