From cbe82704b6423f08355093dc0ca461994825ceef Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Fri, 12 Jul 2019 11:16:44 +0300 Subject: [PATCH] 151: Aero is detected as disabled in Windows 10 'High Contrast' mode --- Eve-O-Preview/Services/Implementation/WindowManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Eve-O-Preview/Services/Implementation/WindowManager.cs b/Eve-O-Preview/Services/Implementation/WindowManager.cs index c1b8d88..80ff23c 100644 --- a/Eve-O-Preview/Services/Implementation/WindowManager.cs +++ b/Eve-O-Preview/Services/Implementation/WindowManager.cs @@ -13,7 +13,11 @@ namespace EveOPreview.Services.Implementation public WindowManager() { - this.IsCompositionEnabled = DwmNativeMethods.DwmIsCompositionEnabled(); + // Composition is always enabled for Windows 8+ + this.IsCompositionEnabled = + ((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor >= 2)) // Win 8 and Win 8.1 + || (Environment.OSVersion.Version.Major >= 10) // Win 10 + || DwmNativeMethods.DwmIsCompositionEnabled(); // In case of Win 7 an API call is requiredWin 7 } public bool IsCompositionEnabled { get; }