diff options
author | MutantAura <44103205+MutantAura@users.noreply.github.com> | 2023-07-21 12:24:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 12:24:13 +0100 |
commit | 9e04e6cba1c264907bff47ce408643d5de157b56 (patch) | |
tree | 0bda5858aa442e8e871fc024a315fb792741f1cc /src | |
parent | 4cf2419e6cfd3d7959914412abbb01f8cd473a76 (diff) |
Ava UI: Remove `IsActive` checks from dialog methods (#5456)1.1.967
* Remove `IsActive` checks from dialog methods
* Remove old windows bandaid
* Remove null dialog code path entirely and return nothing.
Diffstat (limited to 'src')
-rw-r--r-- | src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs | 2 | ||||
-rw-r--r-- | src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs b/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs index d35f44bf..a2a94429 100644 --- a/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs +++ b/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs @@ -53,8 +53,6 @@ namespace Ryujinx.Ava.UI.Applet bool opened = false; - _parent.Activate(); - UserResult response = await ContentDialogHelper.ShowDeferredContentDialog(_parent, title, message, diff --git a/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs b/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs index 7dab57b8..c8e4db08 100644 --- a/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs +++ b/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs @@ -315,8 +315,10 @@ namespace Ryujinx.Ava.UI.Helpers Window parent = GetMainWindow(); - if (parent is { IsActive: true } and MainWindow window && window.ViewModel.IsGameRunning) + if (parent is MainWindow window && window.ViewModel.IsGameRunning) { + parent.Activate(); + contentDialogOverlayWindow = new() { Height = parent.Bounds.Height, @@ -369,7 +371,9 @@ namespace Ryujinx.Ava.UI.Helpers } else { - result = await contentDialog.ShowAsync(); + result = ContentDialogResult.None; + + Logger.Warning?.Print(LogClass.Ui, "Content dialog overlay failed to populate. Default value has been returned."); } return result; @@ -390,7 +394,7 @@ namespace Ryujinx.Ava.UI.Helpers { foreach (Window item in al.Windows) { - if (item.IsActive && item is MainWindow window) + if (item is MainWindow window) { return window; } |