diff --git a/src/backend/udev.rs b/src/backend/udev.rs index 14d03bd..4feb5a7 100644 --- a/src/backend/udev.rs +++ b/src/backend/udev.rs @@ -389,9 +389,29 @@ pub fn run_udev() -> anyhow::Result<()> { } } - for output in data.state.space.outputs().cloned().collect::>() { - data.state.schedule_render(&output); + let connectors = udev + .backends + .iter() + .map(|(node, backend)| { + let connectors = backend + .drm_scanner + .crtcs() + .map(|(info, crtc)| (info.clone(), crtc)) + .collect::>(); + (*node, connectors) + }) + .collect::>(); + + for (node, connectors) in connectors { + for (connector, crtc) in connectors { + data.state + .connector_disconnected(node, connector.clone(), crtc); + data.state.connector_connected(node, connector, crtc); + } } + // for output in data.state.space.outputs().cloned().collect::>() { + // data.state.schedule_render(&output); + // } } } })