wry icon indicating copy to clipboard operation
wry copied to clipboard

Linux X11 winit and transparency not working

Open PawelBis opened this issue 1 year ago • 1 comments

Describe the bug Transparency is not working properly on Linux, X11 with winit window.

  • examples/transparent.rs works just fine.
  • examples/winit.rs with transparency added doesn't work properly

Steps To Reproduce Add transparency to example/winit.rs and notice that you are getting black background instead of transparent one.

Expected behavior Transparency should work.

Screenshots Linux: transparency_winit

MacOS:

Platform and Versions (please complete the following information): OS: Manjaro 24.0.4 Rustc: rustc 1.79.0

Additional context This is my version of modified example/winit: [email protected]:PawelBis/wry.git

PawelBis avatar Jul 18 '24 15:07 PawelBis

You need to make sure you set your winit window to have transparent ``let mut attributes = Window::default_attributes().with_transparent(true);```.

Unfortunately I don't think there is any support for passing through to what was drawn on the parent window if you're drawing something else using wgpu on your winit Surface.

If you ever found a workaround on winit to have the webview be transparent to what was on the parent x11 window's surface (and not the normal desktop) I'd be really interested.

WIGGLES-dev avatar Mar 18 '25 14:03 WIGGLES-dev