From d8d05d0f62dd9a33928236ca7b3d421b87904100 Mon Sep 17 00:00:00 2001 From: yell0wsuit <5692900+yell0wsuit@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:12:07 +0700 Subject: [PATCH] Re-implement OpenChangelogWindow --- src/Ryujinx/UI/Windows/AboutWindow.axaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/UI/Windows/AboutWindow.axaml.cs b/src/Ryujinx/UI/Windows/AboutWindow.axaml.cs index d6e24b439..9663eec91 100644 --- a/src/Ryujinx/UI/Windows/AboutWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/AboutWindow.axaml.cs @@ -3,6 +3,7 @@ using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Layout; using Avalonia.Styling; +using Avalonia.VisualTree; using FluentAvalonia.UI.Controls; using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.UI.Helpers; @@ -55,7 +56,13 @@ namespace Ryujinx.Ava.UI.Windows private void OpenChangelogWindow(object sender, RoutedEventArgs e) { ChangelogWindow changelogWindow = new ChangelogWindow(); - changelogWindow.Show(); + + // Find the parent window to use as the owner for the modal dialog + var parentWindow = this.FindAncestorOfType(); + if (parentWindow != null) + { + changelogWindow.ShowDialog(parentWindow); // Pass the parent window as the owner + } } private void AmiiboLabel_OnPointerPressed(object sender, PointerPressedEventArgs e)