wip: fix for mouse capture bug

This commit is contained in:
Jack Wills
2023-02-28 04:10:31 +00:00
parent 846e0641d0
commit 31bfaa7a95
4 changed files with 78 additions and 55 deletions
+5
View File
@@ -134,6 +134,11 @@ impl InputHandler {
.lock()
.status_contains(&[Status::Error, Status::Init]);
if error_init || self.docker_sender.send(DockerMessage::Quit).await.is_err() {
// This is a fix for a weird bug on Linux + WSL which will output mouse movement to the stdout
std::thread::spawn(||{
execute!(std::io::stdout(), DisableMouseCapture).unwrap_or(());
});
self.is_running.store(false, Ordering::SeqCst);
}
}