From a3e29d9d080db7fa540d0fb49126873303b40131 Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Thu, 12 Oct 2023 12:57:03 +0000 Subject: [PATCH] do not set borders if window state is maximized --- src/Windows/Avalonia.Win32/WindowImpl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index acf9bd72d2f..ffd9b08d4a1 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -1348,7 +1348,7 @@ private void UpdateWindowProperties(WindowProperties newProperties, bool forceCh { style &= ~fullDecorationFlags; - if (newProperties.Decorations == SystemDecorations.BorderOnly) + if (newProperties.Decorations == SystemDecorations.BorderOnly && WindowState != WindowState.Maximized) { style |= WindowStyles.WS_THICKFRAME | WindowStyles.WS_BORDER; }