From 430792681d5adc3c5e32f09dab2d9635690aff6d Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Sun, 6 Mar 2022 16:43:03 +0000 Subject: [PATCH] win32 obey can resize when use relies on BeginResizeDrag --- src/Windows/Avalonia.Win32/WindowImpl.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index 8ccbbc12cd..1fb5dd3f17 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -633,13 +633,16 @@ namespace Avalonia.Win32 public void BeginResizeDrag(WindowEdge edge, PointerPressedEventArgs e) { + if (_windowProperties.IsResizable) + { #if USE_MANAGED_DRAG _managedDrag.BeginResizeDrag(edge, ScreenToClient(MouseDevice.Position.ToPoint(_scaling))); #else - _mouseDevice.Capture(null); - DefWindowProc(_hwnd, (int)WindowsMessage.WM_NCLBUTTONDOWN, - new IntPtr((int)s_edgeLookup[edge]), IntPtr.Zero); + _mouseDevice.Capture(null); + DefWindowProc(_hwnd, (int)WindowsMessage.WM_NCLBUTTONDOWN, + new IntPtr((int)s_edgeLookup[edge]), IntPtr.Zero); #endif + } } public void SetTitle(string title)