From 27d3e73fb7d544202eef68a15aadb7317c2caa9e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 6 Mar 2021 10:24:38 -0500 Subject: [PATCH] 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). --- modules/os/macos/config.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/os/macos/config.el b/modules/os/macos/config.el index df70ef5c7..d35eeca43 100644 --- a/modules/os/macos/config.el +++ b/modules/os/macos/config.el @@ -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