diff options
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/tty.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backend/tty.rs b/src/backend/tty.rs index ab242f6c..530280ab 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -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; |
