mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Fix `after-focus-change-function' not working
* exwm-workspace.el (exwm-workspace--original-handle-focus-in) (exwm-workspace--original-handle-focus-out): Store the original `handle-focus-{in,out}'. (exwm-workspace-switch): Now that `handle-focus-{in,out}' has been updated to call other stuffs like `after-focus-change-function', we can no longer run `focus-{in,out}-hook' only.
This commit is contained in:
parent
0a3dde042a
commit
c579476536
1 changed files with 8 additions and 2 deletions
|
@ -106,6 +106,11 @@ Please manually run the hook `exwm-workspace-list-change-hook' afterwards.")
|
||||||
(defvar exwm-workspace--minibuffer nil
|
(defvar exwm-workspace--minibuffer nil
|
||||||
"The minibuffer frame shared among all frames.")
|
"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
|
(defvar exwm-workspace--prompt-add-allowed nil
|
||||||
"Non-nil to allow adding workspace from the prompt.")
|
"Non-nil to allow adding workspace from the prompt.")
|
||||||
|
|
||||||
|
@ -648,8 +653,9 @@ for internal use only."
|
||||||
(when (and (not (eq frame old-frame))
|
(when (and (not (eq frame old-frame))
|
||||||
(frame-live-p old-frame))
|
(frame-live-p old-frame))
|
||||||
(with-selected-frame old-frame
|
(with-selected-frame old-frame
|
||||||
(run-hooks 'focus-out-hook)))
|
(funcall exwm-workspace--original-handle-focus-out
|
||||||
(run-hooks 'focus-in-hook)
|
(list 'focus-out frame))))
|
||||||
|
(funcall exwm-workspace--original-handle-focus-in (list 'focus-in frame))
|
||||||
(run-hooks 'exwm-workspace-switch-hook)))
|
(run-hooks 'exwm-workspace-switch-hook)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Reference in a new issue