aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2024-01-27 19:11:22 +0200
committerEli Zaretskii2024-01-27 19:11:22 +0200
commit58f0603d40d238383aaa911eb09b3e2809177bfa (patch)
treec3edd679a5f8d9c6f9bcf98093097d7fa13b3e09 /src
parent3c4b6823c3f92291888a24b7fee40de82bb92d68 (diff)
downloademacs-58f0603d40d238383aaa911eb09b3e2809177bfa.tar.gz
emacs-58f0603d40d238383aaa911eb09b3e2809177bfa.zip
Allow users to opt out of following Windows Dark mode
* src/w32fns.c (globals_of_w32fns) <w32-follow-system-dark-mode>: New variable. (w32_applytheme): Disable application of Dark mode if 'w32-follow-system-dark-mode' is nil. * etc/NEWS: * doc/emacs/msdos.texi (Windows Misc): Document 'w32-follow-system-dark-mode'.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index f44460e52c0..8d4bd00b91c 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2376,7 +2376,7 @@ w32_init_class (HINSTANCE hinst)
2376static void 2376static void
2377w32_applytheme (HWND hwnd) 2377w32_applytheme (HWND hwnd)
2378{ 2378{
2379 if (w32_darkmode) 2379 if (w32_darkmode && w32_follow_system_dark_mode)
2380 { 2380 {
2381 /* Set window theme to that of a built-in Windows app (Explorer), 2381 /* Set window theme to that of a built-in Windows app (Explorer),
2382 because it has dark scroll bars and other UI elements. */ 2382 because it has dark scroll bars and other UI elements. */
@@ -11393,6 +11393,14 @@ This variable is used for debugging, and takes precedence over any
11393value of the `inhibit-double-buffering' frame parameter. */); 11393value of the `inhibit-double-buffering' frame parameter. */);
11394 w32_disable_double_buffering = false; 11394 w32_disable_double_buffering = false;
11395 11395
11396 DEFVAR_BOOL ("w32-follow-system-dark-mode", w32_follow_system_dark_mode,
11397 doc: /* Whether to follow the system's Dark mode on MS-Windows.
11398If this is nil, Emacs on MS-Windows will not follow the system's Dark
11399mode as far as the appearance of title bars and scroll bars is
11400concerned, it will always use the default Light mode instead.
11401Changing the value takes effect only for frames created after the change. */);
11402 w32_follow_system_dark_mode = true;
11403
11396 if (os_subtype == OS_SUBTYPE_NT) 11404 if (os_subtype == OS_SUBTYPE_NT)
11397 w32_unicode_gui = 1; 11405 w32_unicode_gui = 1;
11398 else 11406 else