summaryrefslogtreecommitdiff
path: root/src/w32fns.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-11-03 16:02:15 +0200
committerEli Zaretskii <eliz@gnu.org>2021-11-03 16:02:15 +0200
commit0091398af93f0864fcdbd2b5a93aa470450f7612 (patch)
tree036a4ac2483e0d0b75a9a420f2047557b22e6e0e /src/w32fns.c
parent4ddaed34c9b3dbd6f804344ff601ca33044a4a47 (diff)
downloademacs-0091398af93f0864fcdbd2b5a93aa470450f7612.tar.gz
Fix the Cygwin w32 build broken by adding the dark theme support
* src/w32fns.c (w32_applytheme): Make a no-op for Cygwin w32 builds. (globals_of_w32fns): Don't attempt to load dwmapi.dll and uxtheme.dll in the Cygwin w32 build. (Bug#51583)
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index a16adeabfab..48fdafd6c4e 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -273,8 +273,10 @@ int w32_major_version;
int w32_minor_version;
int w32_build_number;
+#ifndef CYGWIN
/* If the OS is set to use dark mode. */
BOOL w32_darkmode = FALSE;
+#endif
/* Distinguish between Windows NT and Windows 95. */
int os_subtype;
@@ -2308,6 +2310,7 @@ w32_init_class (HINSTANCE hinst)
static void
w32_applytheme (HWND hwnd)
{
+#ifndef CYGWIN
if (w32_darkmode)
{
/* Set window theme to that of a built-in Windows app (Explorer),
@@ -2327,6 +2330,7 @@ w32_applytheme (HWND hwnd)
&w32_darkmode, sizeof (w32_darkmode));
}
}
+#endif
}
static HWND
@@ -11087,6 +11091,7 @@ globals_of_w32fns (void)
set_thread_description = (SetThreadDescription_Proc)
get_proc_addr (hm_kernel32, "SetThreadDescription");
+#ifndef CYGWIN
/* Support OS dark mode on Windows 10 version 1809 and higher.
See `w32_applytheme` which uses appropriate APIs per version of Windows.
For future wretches who may need to understand Windows build numbers:
@@ -11117,6 +11122,7 @@ globals_of_w32fns (void)
if (val && *val == 0)
w32_darkmode = TRUE;
}
+#endif
except_code = 0;
except_addr = 0;