about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--exwm-workspace.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 183d91a34cfe..a4ccc2f059cb 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -106,6 +106,11 @@ Please manually run the hook `exwm-workspace-list-change-hook' afterwards.")
 (defvar exwm-workspace--minibuffer nil
   "The minibuffer frame shared among all frames.")
 
+(defvar exwm-workspace--original-handle-focus-in
+  (symbol-function #'handle-focus-in))
+(defvar exwm-workspace--original-handle-focus-out
+  (symbol-function #'handle-focus-out))
+
 (defvar exwm-workspace--prompt-add-allowed nil
   "Non-nil to allow adding workspace from the prompt.")
 
@@ -648,8 +653,9 @@ for internal use only."
     (when (and (not (eq frame old-frame))
                (frame-live-p old-frame))
       (with-selected-frame old-frame
-        (run-hooks 'focus-out-hook)))
-    (run-hooks 'focus-in-hook)
+        (funcall exwm-workspace--original-handle-focus-out
+                 (list 'focus-out frame))))
+    (funcall exwm-workspace--original-handle-focus-in (list 'focus-in frame))
     (run-hooks 'exwm-workspace-switch-hook)))
 
 ;;;###autoload