diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index e70a68ac..0f3def91 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -414,18 +414,17 @@ namespace v2rayN.Desktop.Views } else { - if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose) - { - foreach (var ownedWindow in this.OwnedWindows) - { - ownedWindow.Close(); - } - this.Hide(); - } - else + if (Utils.IsLinux() && _config.UiItem.Hide2TrayWhenClose == false) { this.WindowState = WindowState.Minimized; + return; } + + foreach (var ownedWindow in this.OwnedWindows) + { + ownedWindow.Close(); + } + this.Hide(); } _config.UiItem.ShowInTaskbar = bl; diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml index 0bcfc214..b4a1a49e 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -459,6 +459,7 @@ Classes="Margin8" /> UpdateViewHandler(EViewAction action, object? obj)