GNU bug report logs - #68766
29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar

Previous Next

Package: emacs;

Reported by: "Rahul M. Juliato" <rahuljuliato <at> gmail.com>

Date: Sun, 28 Jan 2024 02:10:02 UTC

Severity: normal

Found in version 29.2

Full log


View this message in rfc822 format

From: Rudolf Schlatte <rudi <at> constantly.at>
To: 68766 <at> debbugs.gnu.org
Subject: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar
Date: Tue, 30 Jan 2024 12:57:45 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> It's "by design", in the sense that this is how the Dark theme support
>> is implemented in Emacs.  If someone submits changes to react to theme
>> change immediately for all the frames, we can consider that for
>> inclusion.
>
> I think that would be a useful feature, indeed.
>
> AFAIU, the point of light/dark mode for many users is that they want to
> use different settings depending on the time of day.  This needs the
> Emacs frame to react to it when the time switches (as most programs in
> desktop environments like Gnome, or even macOS, do).

This is what I have in my init file, conditionalized on (eq
window-system 'mac).  It's not the nicest API, but maybe serves as an
inspiration for a better-designed, more general hook.

(add-hook 'mac-effective-appearance-change-hook
             #'(lambda () (pcase (plist-get (mac-application-state) :appearance)
                            ("NSAppearanceNameDarkAqua" (load-theme 'ef-night t))
                            ("NSAppearanceNameAqua" (load-theme 'ef-frost t)))))





This bug report was last modified 1 year and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.