From 04b9058ebbe6e63a4fc8b0fe1476e7f5b4dd6706 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 2 Jul 2020 15:29:25 -0300 Subject: [PATCH] dont disable close button if we are not extending client area. --- src/Windows/Avalonia.Win32/WindowImpl.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index a5c9c9c3c3..f7e8a0a3e2 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -759,8 +759,8 @@ namespace Avalonia.Win32 _extendedMargins = new Thickness(); } - if(_extendChromeHints.HasFlag(ExtendClientAreaChromeHints.SystemChrome) && - !_extendChromeHints.HasFlag(ExtendClientAreaChromeHints.PreferSystemChrome)) + if(!_isClientAreaExtended || (_extendChromeHints.HasFlag(ExtendClientAreaChromeHints.SystemChrome) && + !_extendChromeHints.HasFlag(ExtendClientAreaChromeHints.PreferSystemChrome))) { EnableCloseButton(_hwnd); }