floating: Animate shadow position with the window

This commit is contained in:
Victoria Brekenfeld 2025-12-15 18:14:35 +01:00 committed by Victoria Brekenfeld
parent 2c9857fdfc
commit a28b11cd5b

View file

@ -1501,14 +1501,6 @@ impl FloatingLayout {
.unwrap_or_else(|| (self.space.element_geometry(elem).unwrap().as_local(), alpha));
let render_location = geometry.loc - elem.geometry().loc.as_local();
let shadow_element = elem.shadow_render_element(
renderer,
render_location
.as_logical()
.to_physical_precise_round(output_scale),
output_scale.into(),
alpha,
);
let mut window_elements = elem.render_elements(
renderer,
render_location
@ -1518,6 +1510,16 @@ impl FloatingLayout {
alpha,
None,
);
window_elements.extend(
elem.shadow_render_element(
renderer,
render_location
.as_logical()
.to_physical_precise_round(output_scale),
output_scale.into(),
alpha,
),
);
if let Some(anim) = self.animations.get(elem) {
let original_geo = anim.previous_geometry();
@ -1630,7 +1632,6 @@ impl FloatingLayout {
}
elements.extend(window_elements);
elements.extend(shadow_element.into_iter());
}
elements