element: Allow overriding default scanout behaviour

This commit is contained in:
Victoria Brekenfeld 2025-07-22 16:39:33 +02:00 committed by Victoria Brekenfeld
parent be1424f1ca
commit c3d2b5f0b7
8 changed files with 52 additions and 9 deletions

View file

@ -618,6 +618,7 @@ impl CosmicMapped {
location: smithay::utils::Point<i32, smithay::utils::Physical>,
scale: smithay::utils::Scale<f64>,
alpha: f32,
scanout_override: Option<bool>,
) -> Vec<C>
where
R: Renderer + ImportAll + ImportMem + AsGlowRenderer,
@ -803,11 +804,19 @@ impl CosmicMapped {
#[cfg_attr(not(feature = "debug"), allow(unused_mut))]
elements.extend(match &self.element {
CosmicMappedInternal::Stack(s) => s.render_elements::<R, CosmicMappedRenderElement<R>>(
renderer, location, scale, alpha,
renderer,
location,
scale,
alpha,
scanout_override,
),
CosmicMappedInternal::Window(w) => w
.render_elements::<R, CosmicMappedRenderElement<R>>(
renderer, location, scale, alpha,
renderer,
location,
scale,
alpha,
scanout_override,
),
_ => unreachable!(),
});