fix: skip dead windows in floating set_output

This commit is contained in:
Ilia Malanin 2026-06-09 11:38:58 +02:00 committed by Victoria Brekenfeld
parent f95b62635d
commit 31f317d16b

View file

@ -295,6 +295,7 @@ impl FloatingLayout {
for mapped in self for mapped in self
.space .space
.elements() .elements()
.filter(|w| w.alive())
.cloned() .cloned()
.collect::<Vec<_>>() .collect::<Vec<_>>()
.into_iter() .into_iter()
@ -309,7 +310,10 @@ impl FloatingLayout {
None, None,
); );
} else { } else {
let geometry = self.space.element_geometry(&mapped).unwrap().to_f64(); let Some(geometry) = self.space.element_geometry(&mapped) else {
continue;
};
let geometry = geometry.to_f64();
let new_loc = ( let new_loc = (
((geometry.loc.x - old_output_geometry.loc.x).max(0.) ((geometry.loc.x - old_output_geometry.loc.x).max(0.)
/ old_output_geometry.size.w / old_output_geometry.size.w