Browse Source

dont disable close button if we are not extending client area.

Dan Walmsley 5 years ago
parent
commit
04b9058ebb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Windows/Avalonia.Win32/WindowImpl.cs

+ 2 - 2
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);
             }