tauri-apps/wry

No transparency for webview in WGPU example on Windows

alexgeek opened this issue · 1 comments

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.

  • f62aa942121f80e1908bc736ae03dc584330bb91
  • a9ad1c5

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