From 3a1486be5622a53c8340cd8bcef8a34d34afd9ed Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 20 May 2020 17:06:00 -0300 Subject: [PATCH] check composition is allowed before allowing extended windows. --- src/Windows/Avalonia.Win32/WindowImpl.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index af1e8e06ce..7474bdd10a 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -670,6 +670,11 @@ namespace Avalonia.Win32 { if (!_isClientAreaExtended) { + if(DwmIsCompositionEnabled(out bool compositionEnabled) < 0 || !compositionEnabled) + { + return; + } + RECT border_thickness = new RECT(); MARGINS margins = new MARGINS();