mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-13 08:01:05 +01:00
Run disconnect and reconnect on connectors when switching tty back
This commit is contained in:
parent
ec0e892bf3
commit
e7ebc40fc7
1 changed files with 22 additions and 2 deletions
|
@ -389,9 +389,29 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
for output in data.state.space.outputs().cloned().collect::<Vec<_>>() {
|
||||
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::<Vec<_>>();
|
||||
(*node, connectors)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
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::<Vec<_>>() {
|
||||
// data.state.schedule_render(&output);
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue