From fbf2b09706a55856c76aaf9051007eedf1f4b0ab Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Tue, 29 Nov 2022 06:33:46 +0100 Subject: [PATCH] ava: Make dialogs using an overlay window work on Linux (#3938) --- Ryujinx.Ava/Ryujinx.Ava.csproj | 2 +- Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Ryujinx.Ava/Ryujinx.Ava.csproj b/Ryujinx.Ava/Ryujinx.Ava.csproj index c851b4513..9818914cf 100644 --- a/Ryujinx.Ava/Ryujinx.Ava.csproj +++ b/Ryujinx.Ava/Ryujinx.Ava.csproj @@ -27,7 +27,7 @@ - + diff --git a/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs b/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs index 9fcc2d2ec..9cf4231c5 100644 --- a/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs +++ b/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs @@ -127,9 +127,16 @@ namespace Ryujinx.Ava.Ui.Controls contentDialog.PrimaryButtonClick += deferCloseAction; } - await contentDialog.ShowAsync(ContentDialogPlacement.Popup); + if (useOverlay) + { + await contentDialog.ShowAsync(overlay, ContentDialogPlacement.Popup); - overlay?.Close(); + overlay!.Close(); + } + else + { + await contentDialog.ShowAsync(ContentDialogPlacement.Popup); + } } if (useOverlay) @@ -391,4 +398,4 @@ namespace Ryujinx.Ava.Ui.Controls return string.Empty; } } -} +} \ No newline at end of file