GNU bug report logs - #2969
Emacs thinks the background-mode is "dark" on Windows, when registry key HKEY_CURRENT_USER\Control Panel\Colors is empty

Previous Next

Packages: emacs, w32;

Reported by: Michael Schierl <schierlm <at> gmx.de>

Date: Sun, 12 Apr 2009 17:50:02 UTC

Severity: normal

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 2969-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Michael Schierl <schierlm <at> gmx.de>, 2969-done <at> 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
Date: Tue, 14 Apr 2009 00:23:32 +0800
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.





This bug report was last modified 16 years and 100 days ago.

Previous Next


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