From eebc16bcdd962ea7b9a72056fb0c230c14202106 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sat, 4 Mar 2023 08:51:29 +0800 Subject: [PATCH] Minimize windows when auto-hide is enabled --- v2rayN/v2rayN/Views/MainWindow.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 9be80b66..f477c5fd 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -191,6 +191,11 @@ namespace v2rayN.Views this.Title = $"{Utils.GetVersion()} - {(IsAdministrator ? ResUI.RunAsAdmin : ResUI.NotRunAsAdmin)}"; spEnableTun.Visibility = IsAdministrator ? Visibility.Visible : Visibility.Collapsed; + + if (_config.uiItem.autoHideStartup) + { + WindowState = WindowState.Minimized; + } } #region Event