os/macos: activate ns-auto-titlebar-mode later

If triggered too early, it may read the wrong frame background mode and
you'll get dark text on a dark titlebar in MacOS dark mode (or light
text on a light titlebar in light mode).
This commit is contained in:
Henrik Lissner 2021-03-06 10:24:38 -05:00
parent e4539bb56c
commit 27d3e73fb7

View file

@ -24,10 +24,9 @@
;; Sets `ns-transparent-titlebar' and `ns-appearance' frame parameters so window
;; borders will match the enabled theme.
(and (or (daemonp)
(display-graphic-p))
(require 'ns-auto-titlebar nil t)
(ns-auto-titlebar-mode +1))
(when (or (daemonp)
(display-graphic-p))
(add-hook 'doom-load-theme-hook #'ns-auto-titlebar-mode))
;; HACK On MacOS, disabling the menu bar makes MacOS treat Emacs as a
;; non-application window -- which means it doesn't automatically capture