From 527af6a141f6bf0be87d3d429c769a7dcaaad533 Mon Sep 17 00:00:00 2001 From: Shatyuka Date: Sun, 8 Dec 2024 02:27:05 +0800 Subject: [PATCH] [TrayIcon] Disable static GUID on Windows11 21H2 --- CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs b/CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs index 69f8d95b7..2ab07c419 100644 --- a/CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs @@ -47,14 +47,14 @@ public TrayIcon() var instanceIndicator = ""; var instanceCount = MainEntryPoint.InstanceCount; var guid = LauncherConfig.GetGuid(instanceCount); - if (m_isWindows11) + if (Environment.OSVersion.Version >= new Version(10, 0, 22621)) { LogWriteLine("[TrayIcon] Initializing Tray with parameters:\r\n\t" + $"GUID: {guid}\r\n\t" + $"Instance Count: {instanceCount}", LogType.Scheme, true); CollapseTaskbar.SetValue(TaskbarIcon.IdProperty, guid); } - else // Do not use static GUID on W10 + else // Do not use static GUID on W10 and W11 21H2 { var guidGet = CollapseTaskbar.GetValue(TaskbarIcon.IdProperty).ToString(); LogWriteLine("[TrayIcon] Initializing Tray with parameters:\r\n\t" +