From abfe46778466ab4050dfc07601f158a81df661b7 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 18 Jan 2019 13:06:00 +0100 Subject: [PATCH] Use Window.Owner as owner in Show. We probably want to change this and pass the owner to the `Show` method as we do for dialogs: having owner specified in different places for dialogs vs non-dialogs is not a good API. --- src/Avalonia.Controls/Window.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index 2ac6299c0e..53f727900b 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -388,7 +388,7 @@ namespace Avalonia.Controls PlatformImpl?.Show(); Renderer?.Start(); } - SetWindowStartupLocation(); + SetWindowStartupLocation(Owner?.PlatformImpl); } /// @@ -464,7 +464,7 @@ namespace Avalonia.Controls return result.Task; } - private void SetWindowStartupLocation(IWindowImpl owner = null) + private void SetWindowStartupLocation(IWindowBaseImpl owner = null) { var scaling = owner?.Scaling ?? PlatformImpl?.Scaling ?? 1;