[bug] Fix Transparency and Rounded Corners Issue on Windows 10
Closed this issue · 6 comments
Describe the bug
My config is like this:
"windows": [
{
"decorations": false,
"transparent": true,
"...": "..."
}
]
However, when I set the window to have rounded corners and the background to be transparent, the following issue occurs. I compared it on Windows 10 and Windows 11; on Windows 10, it looks like the picture, but on Windows 11, there is no such problem. How can I solve this issue?
Reproduction
No response
Expected behavior
No response
Full tauri info
output
It's normal
Stack trace
No response
Additional context
No response
Please provide the output information from tauri info
. This information is crucial for developers to identify your environment and quickly locate issues. Sometimes what you think is normal may not actually be normal.
Please provide the output information from
tauri info
. This information is crucial for developers to identify your environment and quickly locate issues. Sometimes what you think is normal may not actually be normal.
How can I see the complete output of Tauri? There is no output when I'm debugging, and I'm testing the packaged program on Windows 10.
tauri info
is a command from the Tauri command line interface. If you are using pnpm
as the package manager, you can run the command with pnpm tauri info
. Check the documentation here for more.
tauri info
is a command from the Tauri command line interface. If you are usingpnpm
as the package manager, you can run the command withpnpm tauri info
. Check the documentation here for more.
[✔] Environment
- OS: Windows 10.0.19045 x86_64 (X64)
✔ WebView2: 129.0.2792.79
✔ 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: 18.17.1
- pnpm: 9.11.0
- npm: 9.6.7
[-] Packages
- @tauri-apps/api : not installed!
- @tauri-apps/cli : 2.0.2
[-] Plugins
[-] App
tauri info
is a command from the Tauri command line interface. If you are usingpnpm
as the package manager, you can run the command withpnpm tauri info
. Check the documentation here for more.
It seems to be caused by the default window shadow in Windows 10 not being cleared.
Is there any Windows API that can clear it?
I have already solved it by:
getCurrentWeviewWindow().setShadow(false)