Optimization and improvement, tray, etc.

https://github.com/2dust/v2rayN/pull/8083
This commit is contained in:
2dust
2025-10-07 11:16:20 +08:00
parent fec7353703
commit fce4a7b74c
11 changed files with 50 additions and 19 deletions

View File

@@ -412,7 +412,10 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
public void ShowHideWindow(bool? blShow)
{
var bl = blShow ?? (!_config.UiItem.ShowInTaskbar ^ (WindowState == WindowState.Minimized));
var bl = blShow ??
Utils.IsLinux()
? (!_config.UiItem.ShowInTaskbar ^ (WindowState == WindowState.Minimized))
: !_config.UiItem.ShowInTaskbar;
if (bl)
{
this.Show();
@@ -446,8 +449,7 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
base.OnLoaded(sender, e);
if (_config.UiItem.AutoHideStartup)
{
this.ShowHideWindow(false);
_config.UiItem.ShowInTaskbar = true;
ShowHideWindow(false);
}
RestoreUI();
}