fix: remote key-up on triggered release (#371)

Fixes #369
This commit is contained in:
Jon Stelly
2026-02-06 09:06:19 -06:00
committed by GitHub
parent 7863e8b110
commit 0d96948c26

View File

@@ -362,7 +362,13 @@ impl CaptureTask {
}
async fn release_capture(&mut self, capture: &mut InputCapture) -> Result<(), CaptureError> {
self.active_client.take();
// If we have an active client, notify them we're leaving
if let Some(handle) = self.active_client.take() {
log::info!("sending Leave event to client {handle}");
if let Err(e) = self.conn.send(ProtoEvent::Leave(0), handle).await {
log::warn!("failed to send Leave to client {handle}: {e}");
}
}
capture.release().await
}
}