Skip to content

Commit

Permalink
Fix H.NotifyIcon popup not bringing window after click
Browse files Browse the repository at this point in the history
This caused by the confusion of the AUMID being overwritten with different value compared to the executable's title and description.
  • Loading branch information
neon-nyan committed Feb 26, 2025
1 parent 8db60cf commit 485ab73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions CollapseLauncher/Classes/Helper/WindowUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ internal static NotificationService? CurrentToastNotificationService
if (!string.IsNullOrEmpty(currentAumId))
{
// Initialize Toast Notification service
CurrentAumidInGuid = field.Initialize(
currentAumId,
CurrentAumidInGuid = field.Initialize(currentAumId,
executablePath ?? "",
iconLocationStartMenu,
asElevatedUser: true
Expand Down
4 changes: 2 additions & 2 deletions CollapseLauncher/CollapseLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<AssemblyName>CollapseLauncher</AssemblyName>
<ProductName>Collapse</ProductName>
<Product>Collapse</Product>
<Description>Collapse Launcher</Description>
<AssemblyTitle>Collapse Launcher</AssemblyTitle>
<Description>Collapse</Description>
<AssemblyTitle>Collapse</AssemblyTitle>
<Company>Collapse Launcher Team</Company>
<Authors>$(Company). neon-nyan, Cry0, bagusnl, shatyuka, gablm.</Authors>
<Copyright>Copyright 2022-2024 $(Company)</Copyright>
Expand Down
14 changes: 5 additions & 9 deletions CollapseLauncher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public static partial class MainEntryPointExtension

public static class MainEntryPoint
{
#nullable enable
// Decide AUMID string
public const string AppAumid = "Collapse";
#nullable enable
public static int InstanceCount { get; set; }
public static App? CurrentAppInstance { get; set; }
#nullable restore
Expand All @@ -73,14 +75,8 @@ public static void Main(params string[] args)
AppIconSmall = smallIcons[0];
}

// Decide AUMID string
const string aumid = "Collapse";

// Start Updater Hook
StartUpdaterHook(aumid);

// Set AUMID
WindowUtility.CurrentAumid = aumid;
StartUpdaterHook(AppAumid);

InitAppPreset();
var logPath = AppGameLogsFolder;
Expand Down Expand Up @@ -180,7 +176,7 @@ public static void Main(params string[] args)
m_arguments.Migrate.KeyName);
return;
case AppMode.GenerateVelopackMetadata:
GenerateVelopackMetadata(aumid);
GenerateVelopackMetadata(AppAumid);
return;
}

Expand Down

0 comments on commit 485ab73

Please sign in to comment.