[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dark mode on Windows
From: |
Po Lu |
Subject: |
Re: Dark mode on Windows |
Date: |
Mon, 25 Oct 2021 09:22:31 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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, 2021/10/25
- 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