diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 9f11041e..1c01db38 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -390,7 +390,6 @@ namespace v2rayN.Desktop.Views StorageUI(); await ViewModel?.MyAppExitAsync(false); - Close(); } #endregion Event @@ -414,6 +413,10 @@ namespace v2rayN.Desktop.Views { if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose) { + foreach (var ownedWindow in this.OwnedWindows) + { + ownedWindow.Close(); + } this.Hide(); } else @@ -492,4 +495,4 @@ namespace v2rayN.Desktop.Views #endregion UI } -} \ No newline at end of file +}