pub fn window_for_surface(&self, surface: &WlSurface) -> Option<&Window> {
        if !surface.as_ref().is_alive() {
            return None;
        }

        self.windows
            .iter()
            .find(|w| w.toplevel().get_surface().map(|x| x == surface).unwrap_or(false))
    }
/// Returns the window matching a given surface, if any
Returns the window matching a given surface, if any
Returns the window matching a given surface if any
pub fn window_for_surface(&self, surface: &WlSurface) -> Option<&Window> {
        if !surface.as_ref().is_alive() {
            return None;
        }
        self.windows
            .iter()
            .find(|w| w.toplevel().get_surface().map(|x| x == surface).unwrap_or(false))
    }
pub fn window_for_surface ( & self , surface : & WlSurface ) -> Option < & Window > { if ! surface . as_ref ( ) . is_alive ( ) { return None ; } self . windows . iter ( ) . find ( | w | w . toplevel ( ) . get_surface ( ) . map ( | x | x == surface ) . unwrap_or ( false ) ) }
Returns the window matching a given surface, if any
Returns the window matching a given surface if any
&self
surface
&WlSurface
&self
surface
&WlSurface