kms: Fix target node for output

This commit is contained in:
Victoria Brekenfeld 2022-08-03 16:41:47 +02:00
parent 2fa14d8c58
commit 51968b0984

View file

@ -895,9 +895,9 @@ impl KmsState {
} }
pub fn target_node_for_output(&self, output: &Output) -> Option<DrmNode> { pub fn target_node_for_output(&self, output: &Output) -> Option<DrmNode> {
self.devices self.devices
.iter() .values()
.find(|(_, dev)| dev.surfaces.values().any(|s| s.output == *output)) .find(|dev| dev.surfaces.values().any(|s| s.output == *output))
.map(|(target, _)| target) .map(|dev| &dev.render_node)
.copied() .copied()
} }