From: Gijs Vermeulen Subject: [PATCH] dwmapi: Implement DwmIsCompositionEnabled. Message-Id: <20200922155637.142299-1-gijsvrm@gmail.com> Date: Tue, 22 Sep 2020 17:56:37 +0200 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44055 Signed-off-by: Gijs Vermeulen --- 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