fix: face-* calls crashing new emacsclient frames
Those `face-*` calls sometimes returned nil, causing new frames spawned
from emacsclient to quietly crash sometimes. By instead relying on
`frame-inherited-parameters` we achieve the same but more stable result.
Amend: 9753bfb775
This commit is contained in:
parent
1baebdafb3
commit
240493ae92
1 changed files with 9 additions and 5 deletions
|
@ -284,6 +284,14 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
(setq split-width-threshold 160
|
||||
split-height-threshold nil)
|
||||
|
||||
;; Fix incorrect fg/bg in new frames created after the initial frame
|
||||
;; (which are reroneously displayed as black).
|
||||
(setq frame-inherited-parameters '(background-color
|
||||
foreground-color
|
||||
cursor-color
|
||||
border-color
|
||||
mouse-color))
|
||||
|
||||
|
||||
;;
|
||||
;;; Minibuffer
|
||||
|
@ -589,11 +597,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
(setq doom-theme theme)
|
||||
(put 'doom-theme 'previous-themes (or last-themes 'none))
|
||||
;; DEPRECATED Hook into `enable-theme-functions' when we target 29
|
||||
(doom-run-hooks 'doom-load-theme-hook)
|
||||
(when-let* ((fg (face-foreground 'default nil t))
|
||||
(bg (face-background 'default nil t)))
|
||||
(setf (alist-get 'foreground-color default-frame-alist) fg
|
||||
(alist-get 'background-color default-frame-alist) bg)))))))
|
||||
(doom-run-hooks 'doom-load-theme-hook))))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue