diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index a3c70d5b821..bbaed03dd47 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -976,7 +976,7 @@ private void SetWindowStartupLocation(Window? owner = null) PixelSize.FromSize(ownerSize, scaling)); var childRect = ownerRect.CenterRect(rect); - if (Screens.ScreenFromWindow(this)?.WorkingArea is { } constraint) + if (Screens.ScreenFromWindow(owner)?.WorkingArea is { } constraint) { var maxX = constraint.Right - rect.Width; var maxY = constraint.Bottom - rect.Height;