From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86y1ca55er.fsf@gnu.org> References: <87il3enr9u.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11820"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68766@debbugs.gnu.org To: "Rahul M. Juliato" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 28 07:39:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTyov-0002sd-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jan 2024 07:39:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTyoi-000202-Hz; Sun, 28 Jan 2024 01:38:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTyog-0001zg-Uj for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2024 01:38:54 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTyog-0006Rk-Me for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2024 01:38:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTyon-0004pt-RE for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2024 01:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jan 2024 06:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68766 X-GNU-PR-Package: emacs Original-Received: via spool by 68766-submit@debbugs.gnu.org id=B68766.170642391818542 (code B ref 68766); Sun, 28 Jan 2024 06:39:01 +0000 Original-Received: (at 68766) by debbugs.gnu.org; 28 Jan 2024 06:38:38 +0000 Original-Received: from localhost ([127.0.0.1]:56353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTyoP-0004oz-UW for submit@debbugs.gnu.org; Sun, 28 Jan 2024 01:38:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTyoN-0004oh-64 for 68766@debbugs.gnu.org; Sun, 28 Jan 2024 01:38:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTyoA-0006PB-Ai; Sun, 28 Jan 2024 01:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S2g/P5j0PYzT70UiYa8mnl2PtwcmvDaYaVkzxQk6bQs=; b=Wim5HlHgCvQ3 zog/JD9xY0YTZlpM9XQ/IeQtcqoucLI4B6JijAqc+82Z1KJoqdXPxdIxwZ0OBeZpIyaqpOA4v/779 r4CmmeHFNhi8qUMbMUXHhB4Hwl9Xdqrxg4FatatHsSebc8GqQj7yhOmiHlrWBEgLmeoMaxKZAYLc+ zc0qHzF1z8ldc/XyhvKSr71BdwYufP+p7gmU8v9VxBw38R4TSGoeVTEzZWm0RCt8ng5ELi1tkKgAM in76YpSKGlzAjP4vsouC/mSD8L/Rbqq/GpugaJwIto09vdjaBpzi6hdElXtOCyn0CJyiM7Gof8qJ9 GkM2zR/Glbs3lqgM1mzAGA==; In-Reply-To: <87il3enr9u.fsf@gmail.com> (rahuljuliato@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279060 Archived-At: > From: "Rahul M. Juliato" > 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.