diff --git a/examples/raw_legacy_drm.rs b/examples/raw_legacy_drm.rs index 4f0b05a..6afa248 100644 --- a/examples/raw_legacy_drm.rs +++ b/examples/raw_legacy_drm.rs @@ -81,13 +81,7 @@ fn main() { let surface = Rc::new(device.create_surface(crtc).unwrap()); surface.use_mode(Some(mode)).unwrap(); - for conn in surface.current_connectors().into_iter() { - if conn != connector_info.handle() { - surface.remove_connector(conn).unwrap(); - } - } - surface.add_connector(connector_info.handle()).unwrap(); - + surface.set_connectors(&[connector_info.handle()]).unwrap(); /* * Lets create buffers and framebuffers. * We use drm-rs DumbBuffers, because they always work and require little to no setup.