emacs-diffs
[Top][All Lists]
Advanced

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

master 0091398: Fix the Cygwin w32 build broken by adding the dark theme


From: Eli Zaretskii
Subject: master 0091398: Fix the Cygwin w32 build broken by adding the dark theme support
Date: Wed, 3 Nov 2021 10:03:10 -0400 (EDT)

branch: master
commit 0091398af93f0864fcdbd2b5a93aa470450f7612
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 src/w32fns.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/w32fns.c b/src/w32fns.c
index a16adea..48fdafd 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;



reply via email to

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