mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-05 09:21:38 -05:00
Fix #313: Frame focus error.
doom-modeline-focus-change: Symbol’s function definition is void: frame-focus-state. `after-focus-change-function' and `frame-focus-state are introduced' in 27.
This commit is contained in:
parent
4ee3559fb6
commit
333dc074e5
1 changed files with 7 additions and 7 deletions
|
@ -777,15 +777,15 @@ then this function does nothing."
|
|||
(setq doom-modeline-remap-face-cookie
|
||||
(face-remap-add-relative 'mode-line 'mode-line-inactive)))
|
||||
|
||||
(defun doom-modeline-focus-change (&rest _)
|
||||
(if (frame-focus-state)
|
||||
(doom-modeline-focus)
|
||||
(doom-modeline-unfocus)))
|
||||
(advice-add #'handle-switch-frame :after #'doom-modeline-focus-change)
|
||||
|
||||
(with-no-warnings
|
||||
(if (boundp 'after-focus-change-function)
|
||||
(add-function :after after-focus-change-function #'doom-modeline-focus-change)
|
||||
(progn
|
||||
(defun doom-modeline-focus-change (&rest _)
|
||||
(if (frame-focus-state)
|
||||
(doom-modeline-focus)
|
||||
(doom-modeline-unfocus)))
|
||||
(advice-add #'handle-switch-frame :after #'doom-modeline-focus-change)
|
||||
(add-function :after after-focus-change-function #'doom-modeline-focus-change))
|
||||
(progn
|
||||
(add-hook 'focus-in-hook #'doom-modeline-focus)
|
||||
(add-hook 'focus-out-hook #'doom-modeline-unfocus))))
|
||||
|
|
Loading…
Add table
Reference in a new issue