fn consume(
        &mut self,
        output: &wlc::Main<wl_output::WlOutput>,
        evt: &wl_output::Event,
    ) -> Option<outputs::Meta> {
        match evt {
            wl_output::Event::Geometry {
                x,
                y,
                physical_width,
                physical_height,
                subpixel,
                make,
                model,
                transform,
            } => {
                self.meta.position = outputs::Position::from((*x, *y));
                self.meta.physical = outputs::Dimensions::from((*physical_width, *physical_height));
                self.meta.subpixel = *subpixel;
                self.meta.make = make.clone();
                self.meta.model = model.clone();
                self.meta.transform = *transform;
                None
            }
            wl_output::Event::Mode {
                flags,
                width,
                height,
                refresh,
            } => {
                if flags.contains(wl_output::Mode::Current) {
                    self.meta.logical = outputs::Dimensions::from((*width, *height));
                    self.meta.refresh = *refresh;
                }

                None
            }
            wl_output::Event::Done => {
                self.meta.gid = wlc::Proxy::from(output.detach()).id();
                self.meta.enabled = true;
                Some(self.meta.clone())
            }
            wl_output::Event::Scale { factor } => {
                self.meta.scale = (*factor).into();
                None
            }
            _ => {
                tracing::warn!("unknown output event {:?}", evt); // ignore possible future events
                None
            }
        }
    }
/// Incorporate update data from the server for this output.
Incorporate update data from the server for this output.
Incorporate update data from the server for this output .
fn consume(
        &mut self,
        output: &wlc::Main<wl_output::WlOutput>,
        evt: &wl_output::Event,
    ) -> Option<outputs::Meta> {
        match evt {
            wl_output::Event::Geometry {
                x,
                y,
                physical_width,
                physical_height,
                subpixel,
                make,
                model,
                transform,
            } => {
                self.meta.position = outputs::Position::from((*x, *y));
                self.meta.physical = outputs::Dimensions::from((*physical_width, *physical_height));
                self.meta.subpixel = *subpixel;
                self.meta.make = make.clone();
                self.meta.model = model.clone();
                self.meta.transform = *transform;
                None
            }
            wl_output::Event::Mode {
                flags,
                width,
                height,
                refresh,
            } => {
                if flags.contains(wl_output::Mode::Current) {
                    self.meta.logical = outputs::Dimensions::from((*width, *height));
                    self.meta.refresh = *refresh;
                }
                None
            }
            wl_output::Event::Done => {
                self.meta.gid = wlc::Proxy::from(output.detach()).id();
                self.meta.enabled = true;
                Some(self.meta.clone())
            }
            wl_output::Event::Scale { factor } => {
                self.meta.scale = (*factor).into();
                None
            }
            _ => {
                tracing::warn!("unknown output event {:?}", evt); // ignore possible future events
                None
            }
        }
    }
fn consume ( & mut self , output : & wlc :: Main < wl_output :: WlOutput > , evt : & wl_output :: Event , ) -> Option < outputs :: Meta > { match evt { wl_output :: Event :: Geometry { x , y , physical_width , physical_height , subpixel , make , model , transform , } => { self . meta . position = outputs :: Position :: from ( ( * x , * y ) ) ; self . meta . physical = outputs :: Dimensions :: from ( ( * physical_width , * physical_height ) ) ; self . meta . subpixel = * subpixel ; self . meta . make = make . clone ( ) ; self . meta . model = model . clone ( ) ; self . meta . transform = * transform ; None } wl_output :: Event :: Mode { flags , width , height , refresh , } => { if flags . contains ( wl_output :: Mode :: Current ) { self . meta . logical = outputs :: Dimensions :: from ( ( * width , * height ) ) ; self . meta . refresh = * refresh ; } None } wl_output :: Event :: Done => { self . meta . gid = wlc :: Proxy :: from ( output . detach ( ) ) . id ( ) ; self . meta . enabled = true ; Some ( self . meta . clone ( ) ) } wl_output :: Event :: Scale { factor } => { self . meta . scale = ( * factor ) . into ( ) ; None } _ => { tracing :: warn ! ( " " evt ) ; // ignore possible future events None } } }
Incorporate update data from the server for this output.
Incorporate update data from the server for this output .
&mut self
output
&wlc::Main<wl_output::WlOutput>
evt
&wl_output::Event
&mut self
output
&wlc::Main<wl_output::WlOutput>
evt
&wl_output::Event