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#51404: Support system dark mode on Windows 10 Date: Sat, 30 Oct 2021 13:34:12 +0300 Message-ID: <83a6iqpzrv.fsf@gnu.org> References: <834k93zxyo.fsf@gnu.org> <838ryfyawv.fsf@gnu.org> <83r1c5tyar.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51404@debbugs.gnu.org To: salvino@coderedcorp.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 30 12:35:35 2021 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 1mgli3-0003He-2k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 12:35:35 +0200 Original-Received: from localhost ([::1]:50096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgli1-00081l-27 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 06:35:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mglhW-00081d-C2 for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 06:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mglhW-0007R6-3z for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 06:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mglhW-0002NL-1q for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 06:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Oct 2021 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51404-submit@debbugs.gnu.org id=B51404.16355900759080 (code B ref 51404); Sat, 30 Oct 2021 10:35:02 +0000 Original-Received: (at 51404) by debbugs.gnu.org; 30 Oct 2021 10:34:35 +0000 Original-Received: from localhost ([127.0.0.1]:56698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mglh4-0002MO-T3 for submit@debbugs.gnu.org; Sat, 30 Oct 2021 06:34:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mglh0-0002M6-LW for 51404@debbugs.gnu.org; Sat, 30 Oct 2021 06:34:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mglgu-0007Ld-Sy; Sat, 30 Oct 2021 06:34:25 -0400 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=z7UNLMFNsRInpla7uQ88OznF9QbnYxJoBI3R4fb8c3E=; b=PLJ3dfCltQlO Sqtsn8lA+wNsy+/xQFG4/UldUkFZ4xpA95hQq1PLf1ge9PmRpcCYeN08CK/Fhq5N8YSgnj9tJAMUR E7MCKNkx4WYkbOW6tPBHK2ry5WU7Z/b1dNlu741NA9ukwEZibGfM3IzT4Fv6mHVMuCcY0Ao16Lleb BcbfREB6NwNBPoZZ6VDrc3Bi/RzFT0sdbpenFulKJcQwfCWeEloXZ8mdwwkfJdsDB+dT0E78bLKEY cfPz7W2LkzlBqLmz1fZOEJI77q3sDh10MWd5kCOLv1HIh0cHeAS8pilrFRt4Cwru+EHZre2P4THMU XJjFsl7ulFfUTxxLyv+otg==; Original-Received: from [87.69.77.57] (port=4685 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mglgu-0000dM-DY; Sat, 30 Oct 2021 06:34:24 -0400 In-Reply-To: <83r1c5tyar.fsf@gnu.org> (message from Eli Zaretskii on Thu, 28 Oct 2021 10:15:40 +0300) 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" Xref: news.gmane.io gmane.emacs.bugs:218607 Archived-At: > Date: Thu, 28 Oct 2021 10:15:40 +0300 > From: Eli Zaretskii > Cc: 51404@debbugs.gnu.org > > > From: Vince Salvino > > CC: "51404@debbugs.gnu.org" <51404@debbugs.gnu.org> > > Date: Wed, 27 Oct 2021 21:41:05 +0000 > > > > Update: I managed to get my hands on an 1809 system and was able to get dark mode working there as well. As far as I can tell 1809 is the absolute minimum as that is when this setting and dark mode Explorer were introduced into Windows. > > > > The advantage is that this will now work on Windows Server 2019 and Windows LTSC 2019, which some folks may be limited to as those are the latest Server and LTSC releases. > > > > Attached patch includes the complete change, with relevant notes etc. > > Thanks. Your legal paperwork also came through, so I will be > installing this soon. Now done, with a few minor adaptations to our style conventions. Please in the future accompany your changes with ChangeLog-style commit log messages, as described in CONTRIBUTE. (I added those for you in this case.) Can we now please implement the Emacs-specific user setting that will allow users to opt in or out of this feature? Here's what I suggest: . define a variable exposed to Lisp using DEFVAR_BOOL; let's call it w32-follow-system-theme . move the determination of w32_darkmode from globals_of_w32fns to w32_term_init, and make it depend on the value of w32-follow-system-theme: only set w32_darkmode if the variable is non-zero . document that users can customize w32-follow-system-theme in their early-init file (which is processed before window-system initialization that calls x-open-connection) WDYT? (Let me know if you need help in making any of the above happen.) Thanks.