emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dark mode on Windows


From: Óscar Fuentes
Subject: Re: Dark mode on Windows
Date: Mon, 25 Oct 2021 05:25:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Po Lu <luangruo@yahoo.com> writes:

> 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.

KDE and other window managers I use on GNU/Linux set themselves the
window decorations, not the application. Is GTK an exception to that?

>> 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.

Supporting ancient OSes is not a requirement for accepting patches that
implement new capabilities.

> + /* 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?

Yes.

> +      /* 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.

Of course it doesn't work on "slightly old" versions of Windows, because
them lack the feature, as the OP implicitly informs us when he says
"Windows 10 has..."

Why such discouraging review?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]