fn new()

in src/platform_impl/linux/x11/monitor.rs [110:131]


    fn new(
        xconn: &XConnection,
        resources: *mut XRRScreenResources,
        id: RRCrtc,
        crtc: *mut XRRCrtcInfo,
        primary: bool,
    ) -> Option<Self> {
        let (name, scale_factor, video_modes) = unsafe { xconn.get_output_info(resources, crtc)? };
        let dimensions = unsafe { ((*crtc).width as u32, (*crtc).height as u32) };
        let position = unsafe { ((*crtc).x as i32, (*crtc).y as i32) };
        let rect = util::AaRect::new(position, dimensions);
        Some(MonitorHandle {
            id,
            name,
            scale_factor,
            dimensions,
            position,
            primary,
            rect,
            video_modes,
        })
    }