From: Vince Salvino <salvino@coderedcorp.com>
To: Po Lu <luangruo@yahoo.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: Dark mode on Windows
Date: Mon, 25 Oct 2021 04:14:23 +0000 [thread overview]
Message-ID: <CH2PR12MB42316C78B74B53B0C9C2124AA5839@CH2PR12MB4231.namprd12.prod.outlook.com> (raw)
In-Reply-To: <87ee893nl4.fsf@yahoo.com>
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.
next prev parent reply other threads:[~2021-10-25 4:14 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-24 22:27 Dark mode on Windows Vince Salvino
2021-10-25 1:17 ` Po Lu
2021-10-25 1:22 ` Po Lu
2021-10-25 3:25 ` Óscar Fuentes
2021-10-25 4:32 ` Po Lu
2021-10-25 12:31 ` Óscar Fuentes
2021-10-26 5:02 ` Po Lu
2021-10-25 4:14 ` Vince Salvino [this message]
2021-10-25 4:27 ` Po Lu
2021-10-25 5:20 ` Vince Salvino
2021-10-25 6:25 ` Po Lu
2021-10-25 12:37 ` Eli Zaretskii
2021-10-25 15:44 ` Vince Salvino
2021-10-25 16:34 ` Eli Zaretskii
2021-10-25 12:15 ` Eli Zaretskii
2021-10-25 13:17 ` Eric S Fraga
2021-10-25 9:59 ` Alan Third
2021-10-25 11:55 ` Eli Zaretskii
2021-10-25 12:22 ` Stefan Monnier
2021-10-25 12:52 ` Eli Zaretskii
2021-10-25 16:52 ` Michael Albinus
2021-10-26 2:04 ` Po Lu
2021-10-26 12:10 ` Eli Zaretskii
2021-10-26 13:35 ` Po Lu
2021-10-26 14:11 ` Eli Zaretskii
2021-10-25 13:02 ` Óscar Fuentes
2021-10-25 13:28 ` Stefan Monnier
2021-10-25 13:56 ` Óscar Fuentes
2021-10-25 17:20 ` Stefan Monnier
2021-10-26 0:56 ` Po Lu
2021-10-26 1:08 ` Óscar Fuentes
2021-10-26 2:02 ` Po Lu
2021-10-26 12:09 ` Eli Zaretskii
2021-10-27 0:36 ` Po Lu
2021-10-27 12:02 ` Eli Zaretskii
2021-10-26 12:08 ` Eli Zaretskii
2021-10-27 0:37 ` Po Lu
2021-10-27 14:36 ` Richard Stallman
2021-10-27 16:28 ` Vince Salvino
2021-10-27 19:49 ` Óscar Fuentes
2021-10-28 6:19 ` Eli Zaretskii
2021-10-25 12:42 ` Óscar Fuentes
2021-10-25 15:45 ` Vince Salvino
2021-10-26 4:29 ` Vince Salvino
2021-10-26 7:32 ` Po Lu
2021-10-26 14:03 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CH2PR12MB42316C78B74B53B0C9C2124AA5839@CH2PR12MB4231.namprd12.prod.outlook.com \
--to=salvino@coderedcorp.com \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.