Avoid using overlay window when not necessary

This commit is contained in:
Isaac Marovitz 2024-07-20 12:33:19 +01:00
parent 5ad5679145
commit f0f84454a8
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -342,6 +342,8 @@ namespace Ryujinx.Ava.UI.Helpers
isTopDialog = false; isTopDialog = false;
} }
if (parent is MainWindow)
{
parent.Activate(); parent.Activate();
_contentDialogOverlayWindow = new ContentDialogOverlayWindow _contentDialogOverlayWindow = new ContentDialogOverlayWindow
@ -385,6 +387,11 @@ namespace Ryujinx.Ava.UI.Helpers
} }
result = await _contentDialogOverlayWindow.ShowDialog<ContentDialogResult>(parent); result = await _contentDialogOverlayWindow.ShowDialog<ContentDialogResult>(parent);
}
else
{
result = await contentDialog.ShowAsync(parent);
}
async Task<ContentDialogResult> ShowDialog() async Task<ContentDialogResult> ShowDialog()
{ {