diff --git a/src/desktop/space/mod.rs b/src/desktop/space/mod.rs index 3889824..0565bf1 100644 --- a/src/desktop/space/mod.rs +++ b/src/desktop/space/mod.rs @@ -136,10 +136,10 @@ impl Space { }) } - /// Get a reference to the output under a given point, if any - pub fn output_under>>(&self, point: P) -> Option<&Output> { + /// Get a reference to the outputs under a given point + pub fn output_under>>(&self, point: P) -> impl Iterator { let point = point.into(); - self.outputs.iter().rev().find(|o| { + self.outputs.iter().rev().filter(move |o| { let bbox = self.output_geometry(o); bbox.map(|bbox| bbox.to_f64().contains(point)).unwrap_or(false) })