From cdeab696f54541c6a1c9a0f78396d3615b036ca2 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Thu, 28 Jan 2021 22:02:01 +0800 Subject: [PATCH] fixed #637 --- src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs b/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs index 0b472959..6f196d76 100644 --- a/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs +++ b/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs @@ -582,8 +582,10 @@ namespace HandyControl.Controls { if (msg == _wmTaskbarCreated) { - _added = false; - UpdateIcon(true); + if (_messageWindowHandle == hWnd && Visibility == Visibility.Visible) + { + UpdateIcon(true); + } } else {