mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
backend/tty: Consider only primary node in drm udev event
This commit is contained in:
committed by
Ivan Molodetskikh
parent
23cd5aa78a
commit
c8eea8ee9d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user