diff --git a/trunk/CHANGELOG.txt b/trunk/CHANGELOG.txt index 26d7eded6..009987d16 100644 --- a/trunk/CHANGELOG.txt +++ b/trunk/CHANGELOG.txt @@ -1,6 +1,8 @@ Process Hacker 1.3.8.1 + * NEW/IMPROVED: + * Notification icon process list is now sorted * FIXED: * #2795871 - "Hidden Processes window resizing problem" * Windows 7 RC BSOD (Windows 7 Beta is no longer supported) diff --git a/trunk/ProcessHacker/Forms/HackerWindow.cs b/trunk/ProcessHacker/Forms/HackerWindow.cs index 5ab83edf0..84801e72f 100644 --- a/trunk/ProcessHacker/Forms/HackerWindow.cs +++ b/trunk/ProcessHacker/Forms/HackerWindow.cs @@ -634,6 +634,7 @@ namespace ProcessHacker } } + // Remove zero CPU usage processes and processes running as other users for (int i = 0; i < processes.Count && processes.Count > Properties.Settings.Default.IconMenuProcessCount; i++) { if (processes[i].CpuUsage == 0) @@ -648,6 +649,7 @@ namespace ProcessHacker } } + // Sort the processes by CPU usage and remove processes with low CPU usage processes.Sort((i1, i2) => -i1.CpuUsage.CompareTo(i2.CpuUsage)); if (processes.Count > Properties.Settings.Default.IconMenuProcessCount) @@ -657,6 +659,10 @@ namespace ProcessHacker processes.Count - Properties.Settings.Default.IconMenuProcessCount); } + // Then sort the processes by name + processes.Sort((i1, i2) => i1.Name.CompareTo(i2.Name)); + + // Add the processes foreach (var process in processes) { MenuItem processItem = new MenuItem(); diff --git a/trunk/ProcessHacker/Program/Program.cs b/trunk/ProcessHacker/Program/Program.cs index f2c1f17ce..cf682de3e 100644 --- a/trunk/ProcessHacker/Program/Program.cs +++ b/trunk/ProcessHacker/Program/Program.cs @@ -177,6 +177,7 @@ namespace ProcessHacker ThreadPool.SetMaxThreads(2, 2); WorkQueue.GlobalWorkQueue.MaxWorkerThreads = 3; + // Create or open the Process Hacker mutex, used only by the installer. Win32.CreateMutex(IntPtr.Zero, false, "Global\\ProcessHackerMutex"); try