From 7c520247f4e38ed41ce3871eb09315ff6e2a77bb Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Thu, 22 Dec 2022 14:43:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=99=E6=9C=80=E5=B0=8F=E5=8C=96?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E6=B7=BB=E5=8A=A0=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Main/SettingsViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/Main/SettingsViewModel.cs b/src/MaaWpfGui/Main/SettingsViewModel.cs index 4429711ef2..262c353223 100644 --- a/src/MaaWpfGui/Main/SettingsViewModel.cs +++ b/src/MaaWpfGui/Main/SettingsViewModel.cs @@ -429,9 +429,10 @@ namespace MaaWpfGui process.WaitForInputIdle(); if (MinimizingStartup) { - while (!IsIconic(process.MainWindowHandle)) + for (int i = 0; !IsIconic(process.MainWindowHandle) && i < 5000; ++i) { ShowWindow(process.MainWindowHandle, SWMINIMIZE); + Thread.Sleep(1); } }