From e0bae2c0af8494ebc3666e67704ed550f54e7a80 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Mon, 6 Jan 2025 22:13:48 +0000 Subject: [PATCH] fix(keys): high cpu usage Fixes #834 --- src/clients/libinput.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/clients/libinput.rs b/src/clients/libinput.rs index 9259e006..6de1b8bd 100644 --- a/src/clients/libinput.rs +++ b/src/clients/libinput.rs @@ -217,6 +217,9 @@ impl Client { _ => {} } } + + // we need to sleep for a short period to avoid hogging cpu + std::thread::sleep(Duration::from_millis(20)); } }