diff --git a/src/config/mod.rs b/src/config/mod.rs index e61ff498..a62a698a 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -123,8 +123,9 @@ impl CompositeDeviceConfig { let Some(hidraw_devices) = self.get_matching_hidraw()? else { return Ok(true); }; + let hidraw_configs = self.get_hidraw_configs(); - Ok(hidraw_devices.len() >= 1) + Ok(hidraw_devices.len() >= hidraw_configs.len()) } /// Returns true if all the evdev source devices in the config exist on the system @@ -205,12 +206,7 @@ impl CompositeDeviceConfig { // Construct a device ID from the vendor and product to see // if this device has already been matched. - let device_id = format!( - "{:04x}:{:04x}:{}", - device.vendor_id(), - device.product_id(), - device.interface_number() - ); + let device_id = format!("{:04x}:{:04x}", device.vendor_id(), device.product_id()); if seen_devices.contains(&device_id) { log::debug!("Device already seen: {}", device_id); continue; diff --git a/src/input/manager.rs b/src/input/manager.rs index eacf6fde..c099d7a1 100644 --- a/src/input/manager.rs +++ b/src/input/manager.rs @@ -648,7 +648,6 @@ impl Manager { if let Err(e) = result { log::error!("Unable to send command: {:?}", e); } - break; } // Perform an initial event device discovery @@ -676,7 +675,6 @@ impl Manager { if let Err(e) = result { log::error!("Unable to send command: {:?}", e); } - break; } // Start a task to dispatch filesystem watch events to the `run()` loop