Fix over-aggressive theme reloading
`display-graphic-p` returns a boolean (possibly a recent change in Emacs 27), which will never match any window system, causing the theme to be reloaded on every new frame. Also default doom-last-window-system to initial-window-system.
This commit is contained in:
parent
cc3fd3126a
commit
da6ce8e3f9
1 changed files with 3 additions and 2 deletions
|
@ -546,7 +546,8 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
|||
;; Theme & font
|
||||
;;
|
||||
|
||||
(defvar doom-last-window-system (if (daemonp) 'daemon window-system)
|
||||
(defvar doom-last-window-system
|
||||
(if (daemonp) 'daemon initial-window-system)
|
||||
"The `window-system' of the last frame. If this doesn't match the current
|
||||
frame's window-system, the theme will be reloaded.")
|
||||
|
||||
|
@ -588,7 +589,7 @@ frame's window-system, the theme will be reloaded.")
|
|||
(defun doom|init-theme-in-frame (frame)
|
||||
"Reloads the theme in new daemon or tty frames."
|
||||
(when (and (framep frame)
|
||||
(not (eq doom-last-window-system (display-graphic-p frame))))
|
||||
(not (eq doom-last-window-system (framep-on-display frame))))
|
||||
(with-selected-frame frame
|
||||
(doom|init-theme))
|
||||
(setq doom-last-window-system (display-graphic-p frame))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue