[PATCH] dwmapi: Implement DwmIsCompositionEnabled.

Gijs Vermeulen gijsvrm at gmail.com
Tue Sep 22 10:56:37 CDT 2020


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44055
Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
---
I tested to see if win8 or win8.1 was the cutoff by advertising only win8 in a manifest
TestBot run can be found here: https://testbot.winehq.org/JobDetails.pl?Key=78961

Run to see which machines return false without any other changes
can be found here: https://testbot.winehq.org/JobDetails.pl?Key=78963 

 dlls/dwmapi/dwmapi_main.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index 8408a2efed..eb11ecb6b7 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -51,19 +51,20 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
  */
 HRESULT WINAPI DwmIsCompositionEnabled(BOOL *enabled)
 {
-    static int once;
-    if (!once)
-    {
-        FIXME("%p\n", enabled);
-        once = 1;
-    }
-    else
-        TRACE("%p\n", enabled);
+    OSVERSIONINFOW version;
+
+    TRACE("%p\n", enabled);
 
     if (!enabled)
         return E_INVALIDARG;
 
-    *enabled = FALSE;
+    version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
+
+    if (!GetVersionExW(&version))
+        *enabled = FALSE;
+    else
+        *enabled = (version.dwMajorVersion > 6 || (version.dwMajorVersion == 6 && version.dwMinorVersion >= 3));
+
     return S_OK;
 }
 
-- 
2.28.0




More information about the wine-devel mailing list