From 71ecd8e3660ec770ba6176db5774364a4de50055 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 13 Oct 2017 15:43:05 -0700 Subject: [PATCH] avoid running the focus timer immediately see https://www.gnu.org/software/emacs/manual/html_node/elisp/Idle-Timers.html fixes #310 --- exwm-input.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exwm-input.el b/exwm-input.el index d14b0b5..8ad5687 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -189,7 +189,8 @@ This value should always be overwritten.") (when exwm-input--update-focus-timer (cancel-timer exwm-input--update-focus-timer)) (setq exwm-input--update-focus-timer - (run-with-idle-timer exwm-input--update-focus-interval nil + (run-with-idle-timer (time-add (current-idle-time) exwm-input--update-focus-interval) + nil #'exwm-input--update-focus exwm-input--update-focus-window))))