From c5e35144d1d20899e51cc8ee6ff74ca6b3695dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Sun, 10 Mar 2024 21:55:07 +0000 Subject: [PATCH] Fix host windows dragging on Windows --- src/Dock.Avalonia/Controls/HostWindow.axaml.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Dock.Avalonia/Controls/HostWindow.axaml.cs b/src/Dock.Avalonia/Controls/HostWindow.axaml.cs index 5957bcd68..c49308947 100644 --- a/src/Dock.Avalonia/Controls/HostWindow.axaml.cs +++ b/src/Dock.Avalonia/Controls/HostWindow.axaml.cs @@ -100,11 +100,6 @@ private void MoveDrag(PointerPressedEventArgs e) PseudoClasses.Set(":dragging", true); _draggingWindow = true; BeginMoveDrag(e); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - EndDrag(e); - } } private void EndDrag(PointerEventArgs e) @@ -148,9 +143,7 @@ private void HostWindow_PositionChanged(object? sender, PixelPointEventArgs e) { Window.Save(); - if ((_chromeGrip is { } && _chromeGrip.IsPointerOver) - || (_hostWindowTitleBar?.BackgroundControl is { } && (_hostWindowTitleBar?.BackgroundControl?.IsPointerOver ?? false)) - && _mouseDown) + if (_mouseDown) { Window.Factory?.OnWindowMoveDrag(Window); _hostWindowState.Process(Position.ToPoint(1.0), EventType.Moved);