From unknown Sat Aug 16 22:00:10 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2969 <2969@debbugs.gnu.org> To: bug#2969 <2969@debbugs.gnu.org> Subject: Status: Emacs thinks the background-mode is "dark" on Windows, when registry key HKEY_CURRENT_USER\Control Panel\Colors is empty Reply-To: bug#2969 <2969@debbugs.gnu.org> Date: Sun, 17 Aug 2025 05:00:10 +0000 retitle 2969 Emacs thinks the background-mode is "dark" on Windows, when re= gistry key HKEY_CURRENT_USER\Control Panel\Colors is empty reassign 2969 emacs,w32 submitter 2969 Michael Schierl severity 2969 normal thanks From schierlm@gmx.de Sun Apr 12 10:42:02 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Apr 2009 17:42:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.4 required=4.0 tests=FOURLA,MURPHY_WRONG_WORD1, MURPHY_WRONG_WORD2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3CHfxlP022675 for ; Sun, 12 Apr 2009 10:42:00 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lt3gs-00011S-Nv for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2009 13:41:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lt3gn-00011G-Ad for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2009 13:41:57 -0400 Received: from [199.232.76.173] (port=45495 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lt3gn-00011D-5z for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2009 13:41:53 -0400 Received: from mail.gmx.net ([213.165.64.20]:38923) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Lt3gm-00080o-Hq for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2009 13:41:52 -0400 Received: (qmail invoked by alias); 12 Apr 2009 17:41:49 -0000 Received: from p549BDB1C.dip.t-dialin.net (EHLO [192.168.0.203]) [84.155.219.28] by mail.gmx.net (mp011) with SMTP; 12 Apr 2009 19:41:49 +0200 X-Authenticated: #13243522 X-Provags-ID: V01U2FsdGVkX18ZzOV1IKMZ8F3hwQslkuoVQDsDO0Xj5BWOPO3Rbs BOnMDhsn8s0dHE Message-ID: <49E227DE.3030404@gmx.de> Date: Sun, 12 Apr 2009 19:41:50 +0200 From: Michael Schierl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Emacs thinks the background-mode is "dark" on Windows, when registry key HKEY_CURRENT_USER\Control Panel\Colors is empty X-Enigmail-Version: 0.95.7 OpenPGP: id=58B48CDD Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Please describe exactly what actions triggered the bug and the precise symptoms of the bug: One one particular Windows system I have the effect that Emacs started up with black text on white background, but the links were cyan (as if the background was dark). (frame-parameter nil 'background-mode) returned 'dark. After a bit of investigation, I noticed that the registry key HKEY_CURRENT_USER\Control Panel\Colors did not have any values assigned. I don't know how this can happen, but it seems that Windows copes very well with that, I never had any incorrectly displayed program before. The WINAPI call GetSysColor(5) still returns 0xFFFFFF, as expected, so the background is drawn in white. As a workaround, I changed one of the system colors in control panel, so that Windows rewrote all the Colors keys in the registry. Now Emacs looks fine. (This bug report text is from before the change, so you still see the original error messages below). In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on RELEASE Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: DEU locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: encoded-kbd-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: M-x r e p o r t - e m Recent messages: Unable to load color "SystemWindowText" Unable to load color "SystemWindow" Unable to load color "SystemWindowText" Unable to load color "SystemWindow" [2 times] Unable to load color "SystemWindowText" Unable to load color "SystemWindow" Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done Unable to load color "SystemWindowText" From jasonr@gnu.org Sun Apr 12 22:23:26 2009 Received: (at control) by emacsbugs.donarmstrong.com; 13 Apr 2009 05:23:26 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.5 required=4.0 tests=VALID_BTS_CONTROL,XIRONPORT autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mk-outboundfilter-3.mail.uk.tiscali.com (mk-outboundfilter-3.mail.uk.tiscali.com [212.74.114.23]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3D5NLgX023613 for ; Sun, 12 Apr 2009 22:23:23 -0700 X-Trace: 237296231/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130/None/jasonr@gnu.org X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-MUA: Thunderbird 2.0.0.21 (Windows/20090302) X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYCAE9p4kk9BGeC/2dsb2JhbAAIyBiDfAY X-IronPort-AV: E=Sophos;i="4.40,178,1238972400"; d="scan'208";a="237296231" X-IP-Direction: OUT Received: from unknown (HELO [10.1.1.112]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Apr 2009 06:23:14 +0100 Message-ID: <49E2CC1B.9000508@gnu.org> Date: Mon, 13 Apr 2009 13:22:35 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Emacs bug Tracking System Subject: reassign windows bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit reassign 2969 emacs,w32 From jasonrumney@gmail.com Mon Apr 13 09:24:12 2009 Received: (at 2969-done) by emacsbugs.donarmstrong.com; 13 Apr 2009 16:24:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3DGO8YU007926 for <2969-done@emacsbugs.donarmstrong.com>; Mon, 13 Apr 2009 09:24:09 -0700 Received: by ti-out-0910.google.com with SMTP id u3so1814870tia.1 for <2969-done@emacsbugs.donarmstrong.com>; Mon, 13 Apr 2009 09:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=46gIOgRN4ntQ3vZvwv7Y9AqoIEe+06Xf3YH8JHjV30k=; b=WoA2hmg9Gbon3Ah7bnYdhG5Ztkv/ABx/lmQBqYXjQO6mqlzaj30NZkugJfUGG7bqwp v+k8XbiVUccxeYpbse/B0T0V1kQhLOgv+slR44y+wPKqu/4EQaj6No9l9B/dImUv8R3X hRyNaR//zhRJcPJLiLNA3fTP6TKmxoP5fP268= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=PjmjR7gFdn76qP+v7IGTjTyTM2pBIOm2Ybd2M5hHU+prISSzYYZvVUngDV4CjGQlKd RdQBOYltkVRIIDqOaJsI8uwSyF3fHz7DFIsz5BMUDWKHkcgKDZD19XNIRYUATrYJG3wM nEOUOOn3fFpPxIh8yKH/xXFWABZXaW47pIvCQ= Received: by 10.110.42.17 with SMTP id p17mr8003520tip.51.1239639847618; Mon, 13 Apr 2009 09:24:07 -0700 (PDT) Received: from ?192.168.249.26? ([118.101.105.208]) by mx.google.com with ESMTPS id d7sm1374459tib.22.2009.04.13.09.24.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 13 Apr 2009 09:24:04 -0700 (PDT) Sender: Jason Rumney Message-ID: <49E36704.1010507@gnu.org> Date: Tue, 14 Apr 2009 00:23:32 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Michael Schierl , 2969-done@debbugs.gnu.org Subject: Re: bug#2969: Emacs thinks the background-mode is "dark" on Windows, when registry key HKEY_CURRENT_USER\Control Panel\Colors is empty References: <49E227DE.3030404@gmx.de> In-Reply-To: <49E227DE.3030404@gmx.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Michael Schierl wrote: > After a bit of investigation, I noticed that the registry key > HKEY_CURRENT_USER\Control Panel\Colors > did not have any values assigned. I don't know how this can happen, but > it seems that Windows copes very well with that, I never had any > incorrectly displayed program before. > > The WINAPI call GetSysColor(5) still returns 0xFFFFFF, as expected, so > the background is drawn in white. > Thank you for the report. Emacs does not use GetSysColor, as to do so would require hardcoding system color names rather than reading them from the registry as it does now. White is used as a fallback, because it is the default background color for w32 frames. I have changed frame-set-background-mode to take this into account instead of falling through to the default of dark when non-existent colors are specified. From unknown Sat Aug 16 22:00:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 May 2009 14:24:18 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator