From dd6596b1f41a02021d5b60e823a3ae7e5664c92a Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Fri, 24 Nov 2017 22:47:42 +0800 Subject: Another fix for input focus issues * exwm-core.el (exwm--defer): * exwm-input.el (exwm-input--update-focus-defer): Avoid unnecessarily long delay. * exwm-input.el (exwm-input--on-FocusIn): Filter out FocusIn events generated as a result of grab/ungrab or when the keyboard is grabbed. --- exwm-core.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'exwm-core.el') diff --git a/exwm-core.el b/exwm-core.el index 146594da0a..2c810dfc64 100644 --- a/exwm-core.el +++ b/exwm-core.el @@ -76,10 +76,12 @@ (xcb:flush exwm--connection)) (defmacro exwm--defer (secs function &rest args) - "Defer the action until SECS seconds later. + "Defer the execution of FUNCTION. -The action is to call FUNCTION with arguments ARGS." - `(run-with-idle-timer (time-add (or (current-idle-time) 0) ,secs) +The action is to call FUNCTION with arguments ARGS. If Emacs is not idle, +defer the action until Emacs is idle. Otherwise, defer the action until at +least SECS seconds later." + `(run-with-idle-timer (time-add (or (current-idle-time) (- ,secs)) ,secs) nil ,function ,@args)) -- cgit 1.4.1