unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Rahul M. Juliato" <rahuljuliato@gmail.com>
Cc: 68766@debbugs.gnu.org
Subject: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar
Date: Sun, 28 Jan 2024 08:38:20 +0200	[thread overview]
Message-ID: <86y1ca55er.fsf@gnu.org> (raw)
In-Reply-To: <87il3enr9u.fsf@gmail.com> (rahuljuliato@gmail.com)

> From: "Rahul M. Juliato" <rahuljuliato@gmail.com>
> Date: Sat, 27 Jan 2024 23:08:45 -0300
> 
> It seems Emacs only sets it's title bar and scrollbar colors during
> initialization, not during run time.

More accurately, the dark/light theme is examined and affected when
Emacs creates a frame.  So in the scenario you described, any frames
created _after_ running the script should obey the new dark/light
setting, but the frames which existed at the time of the change will
retain their appearance.

> I do not know if this is "by design" or "a bug", hence my bug-report.

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'd also like to mention that ~auto-dark~ has a hook after changing to
> both light/dark modes that could be used to run some extra elisp code if
> needed.
> 
> Is it possible to change the system title bar/scrollbar colors or "theme"
> from inside Emacs with Elisp?

No, it is not currently possible.  The code which determines the
dark/light mode of a frame runs at frame creation time, so exposing it
to Lisp would not be useful.  The development version (what will be
Emacs 30 in due time) has a user option to opt out of following the
system-wide Dark mode, but that option is only useful if set in the
init file.





  parent reply	other threads:[~2024-01-28  6:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28  2:08 bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Rahul M. Juliato
2024-01-28  2:40 ` Stefan Kangas
2024-01-28  6:42   ` Eli Zaretskii
2024-01-30 19:52     ` Rahul M. Juliato
2024-01-28  6:38 ` Eli Zaretskii [this message]
2024-01-29 22:34   ` Stefan Kangas
2024-01-30  7:37     ` Visuwesh
2024-01-30 11:57     ` Rudolf Schlatte
2024-01-30 13:15       ` Eli Zaretskii
2024-01-30 19:57 ` Rahul M. Juliato
2024-02-03  9:57   ` Eli Zaretskii
2024-02-19  1:15     ` Rahul M. Juliato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86y1ca55er.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68766@debbugs.gnu.org \
    --cc=rahuljuliato@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).