Skip to content

Commit efe382b

Browse files
committed
fix: Clear the input state (e.g. send release events, center axes, etc.) on target devices on source disconnect
1 parent c46f9cf commit efe382b

File tree

1 file changed

+4
-0
lines changed
  • src/input/composite_device

1 file changed

+4
-0
lines changed

src/input/composite_device/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,10 @@ impl CompositeDevice {
15251525
// Signal to DBus that source devices have changed
15261526
self.signal_sources_changed().await;
15271527

1528+
// Clear the state of target devices in case the source device was
1529+
// disconnected in the middle of an input.
1530+
self.targets.schedule_clear_state();
1531+
15281532
log::debug!(
15291533
"Current source device paths: {:?}",
15301534
self.source_device_paths

0 commit comments

Comments
 (0)