backend/tty: Consider only primary node in drm udev event

This commit is contained in:
athul-krishna-kr
2025-10-19 12:09:51 +00:00
committed by Ivan Molodetskikh
parent 23cd5aa78a
commit c8eea8ee9d
+17
View File
@@ -512,6 +512,13 @@ impl Tty {
let node = DrmNode::from_dev_id(device_id)?;
// Only consider primary node on udev event
// https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/768fbaad54027f8dd027e7e015e8eeb93cb38c52
if node.ty() != NodeType::Primary {
debug!("not a primary node, skipping");
return Ok(());
}
if self.ignored_nodes.contains(&node) {
debug!("node is ignored, skipping");
return Ok(());
@@ -649,6 +656,11 @@ impl Tty {
return;
};
if node.ty() != NodeType::Primary {
debug!("not a primary node, skipping");
return;
}
if self.ignored_nodes.contains(&node) {
debug!("node is ignored, skipping");
return;
@@ -767,6 +779,11 @@ impl Tty {
return;
};
if node.ty() != NodeType::Primary {
debug!("not a primary node, skipping");
return;
}
let Some(device) = self.devices.get_mut(&node) else {
warn!("unknown device");
return;