[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Dark mode on Windows
From: |
Vince Salvino |
Subject: |
RE: Dark mode on Windows |
Date: |
Mon, 25 Oct 2021 04:14:23 +0000 |
Answering your questions, Po:
> Is this feature available on free operating systems?
This is not a feature of emacs, rather it is a specific feature of Windows
which is being supported (e.g. the window manager "chrome" around GUI emacs).
Other operating systems have their own window managers, which actually are
user-controllable, and would not require such a kludge in emacs :)
> This will not work on Windows NT prior to NT 6.0, or any version of Windows
> 9x.
I have outlined ideas for this in the README.md in my fork. It would probably
be possible to create a separate build profile, similar to NT vs Cygwin, etc.
That is a bit beyond my skills, and I have no way of testing those systems.
> What is the purpose of this define? Is `DWMWA_USE_IMMERSIVE_DARK_MODE' an
> undocumented feature?
The value set by that define, and its use in DwmSetWindowAttribute, is
undocumented (but heavily used and known among developers). See the inspiration
links in my README.md.
> This needs to be controllable by the user, and will similarly not work on
> slightly old versions of Windows.
I have recently addressed the version compatibility issue. There is also a TODO
for the controllable aspect.
Vince Salvino
-----Original Message-----
From: Po Lu <luangruo@yahoo.com>
Sent: Sunday, October 24, 2021 9:23 PM
To: Vince Salvino <salvino@coderedcorp.com>
Cc: emacs-devel@gnu.org
Subject: Re: Dark mode on Windows
Po Lu <luangruo@yahoo.com> writes:
> Is this feature available on free operating systems?
>
> The X11+GTK port, which runs on free operating systems, needs this
> feature.
>
> P.S. this is also a problem with the NS port. The ability to use a
> dark stylesheet for window decorations is only available on macOS, and
> not GNUstep.
Some other comments:
+ # darkmode
+ W32_LIBS="$W32_LIBS -ldwmapi"
+ # darkmode
This will not work on Windows NT prior to NT 6.0, or any version of Windows 9x.
+ /* darkmode */
+ #include <dwmapi.h>
+ #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
+ #define DWMWA_USE_IMMERSIVE_DARK_MODE 20 #endif
+ /* darkmode */
What is the purpose of this define? Is `DWMWA_USE_IMMERSIVE_DARK_MODE'
an undocumented feature?
+ /* Enable darkmode */
+ BOOL isDarkMode = TRUE;
+ DwmSetWindowAttribute(hwnd,
+ DWMWA_USE_IMMERSIVE_DARK_MODE,
+ &isDarkMode,
+ sizeof(isDarkMode));
This needs to be controllable by the user, and will similarly not work on
slightly old versions of Windows.
- Dark mode on Windows, Vince Salvino, 2021/10/24
- RE: Dark mode on Windows,
Vince Salvino <=
- Re: Dark mode on Windows, Po Lu, 2021/10/25
- RE: Dark mode on Windows, Vince Salvino, 2021/10/25
- Re: Dark mode on Windows, Po Lu, 2021/10/25
- Re: Dark mode on Windows, Eli Zaretskii, 2021/10/25
- RE: Dark mode on Windows, Vince Salvino, 2021/10/25
- Re: Dark mode on Windows, Eli Zaretskii, 2021/10/25
- Re: Dark mode on Windows, Eli Zaretskii, 2021/10/25
- Re: Dark mode on Windows, Eric S Fraga, 2021/10/25
Re: Dark mode on Windows, Alan Third, 2021/10/25
Re: Dark mode on Windows, Eli Zaretskii, 2021/10/25