Skip to content

Commit

Permalink
[TrayIcon] Disable static GUID on Windows11 21H2
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed Dec 7, 2024
1 parent 4184f68 commit 527af6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down

0 comments on commit 527af6a

Please sign in to comment.