wry icon indicating copy to clipboard operation
wry copied to clipboard

No transparency for webview in WGPU example on Windows

Open alexgeek opened this issue 1 year ago • 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
  • a9ad1c5c6a85001aac8de64ebb0395e8d647598a

alexgeek avatar Aug 05 '24 16:08 alexgeek

This is because winit set WS_CLIPCHILDREN by default, the current example uses [email protected] which doesn't have a way to disable that but [email protected] 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

amrbashir avatar Aug 16 '24 03:08 amrbashir

The same thing happens on macos, but can make it transparent by adding “transparent” to wry features.

https://github.com/tauri-apps/wry/issues/1266

aiueo13 avatar Jan 16 '25 00:01 aiueo13