Fix transparent_window example on wayland (#15262)

Wayland only supports pre-multiplied alpha. Behavior on X11 seems
unchanged.

# Objective

- Fix #10929 on wayland.

## Solution

- Request pre-multiplied alpha.

## Testing

- Ran the example locally.
This commit is contained in:
mahkoh 2024-10-06 22:07:46 +02:00 committed by GitHub
parent e7c1c997ac
commit f37f5fd281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@
//! for more details.
use bevy::prelude::*;
#[cfg(target_os = "macos")]
#[cfg(any(target_os = "macos", target_os = "linux"))]
use bevy::window::CompositeAlphaMode;
fn main() {
@ -18,6 +18,8 @@ fn main() {
decorations: false,
#[cfg(target_os = "macos")]
composite_alpha_mode: CompositeAlphaMode::PostMultiplied,
#[cfg(target_os = "linux")]
composite_alpha_mode: CompositeAlphaMode::PreMultiplied,
..default()
}),
..default()