tauri-apps / wry

Cross-platform WebView library in Rust for Tauri.
Apache License 2.0
3.51k stars 262 forks source link

No transparency for webview in WGPU example on Windows #1331

Open alexgeek opened 1 month ago

alexgeek commented 1 month ago

Describe the bug I'm running the WGPU example on Windows and the sub view which displays the user agent has a 0.5 alpha but it has a grey background is not blending the triangle rendered by WGPU underneath it.

Steps To Reproduce Run cargo run --example wgpu.

Expected behavior I expected the sub webview to blend over the triangle.

Screenshots Screenshot 2024-08-05 172504

Platform and Versions (please complete the following information): OS: Windows 11 Rustc: 1.79.0 (129f3b996 2024-06-10)

Additional context Came to this after looking at #677 and wanted to try it out, I don't think it's related to #692. I tried the following commits also from around the time #677 when was completed, but I didn't get any webview rendered, just the red triangle.

amrbashir commented 4 weeks ago

This is because winit set WS_CLIPCHILDREN by default, the current example uses winit@0.29 which doesn't have a way to disable that but wini@0.30 does, see https://docs.rs/winit/latest/x86_64-pc-windows-msvc/winit/platform/windows/trait.WindowAttributesExtWindows.html#tymethod.with_clip_children

I will leave this open for a while until I have time to update the examples