Browse Source

Fix shutdown freeze on macos

pull/438/head
ionite34 11 months ago
parent
commit
07d7a43aa5
No known key found for this signature in database
GPG Key ID: B3404C5F3827849B
  1. 7
      StabilityMatrix.Avalonia/App.axaml.cs

7
StabilityMatrix.Avalonia/App.axaml.cs

@ -585,9 +585,16 @@ public sealed class App : Application
{
if (Current is null)
throw new NullReferenceException("Current Application was null when Shutdown called");
if (Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime lifetime)
{
lifetime.Shutdown(exitCode);
if (Compat.IsMacOS)
{
Dispatcher.UIThread.InvokeShutdown();
Environment.Exit(exitCode);
}
}
}

Loading…
Cancel
Save