Working taskbar refresh after stopping programs

Moved the refreshnotificationarea logic to only be used when needed.
This commit is contained in:
Terry MacDonald 2022-02-07 15:18:30 +13:00
parent b65d42e3ea
commit 1f6af1f0c7
3 changed files with 8 additions and 5 deletions

View File

@ -26,8 +26,8 @@ using System.Resources;
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
// Version information
[assembly: AssemblyVersion("2.2.0.247")]
[assembly: AssemblyFileVersion("2.2.0.247")]
[assembly: AssemblyVersion("2.2.0.250")]
[assembly: AssemblyFileVersion("2.2.0.250")]
[assembly: NeutralResourcesLanguageAttribute( "en" )]
[assembly: CLSCompliant(true)]

View File

@ -1921,8 +1921,12 @@ namespace DisplayMagician
// Shutdown the processes
ProcessUtils.StopProcess(startProgramsToStop);
// Refresh the system tray / notification tray area to clean out any applications we stopped
DisplayMagicianShared.Windows.TaskBarStuckRectangle.RefreshTrayArea();
}
// Change Audio Device back (if one specified)
if (activeAudioDevices.Count > 0)
{
@ -2067,6 +2071,8 @@ namespace DisplayMagician
}
}
// Reset the popup over the system tray icon to what's normal for it.
// Set the notifyIcon text with the current profile

View File

@ -1439,9 +1439,6 @@ namespace DisplayMagicianShared.Windows
SharedLogger.logger.Trace($"WinLibrary/SetActiveConfig: The current taskbar settings are the same as the one's we want, so skipping setting them!");
}
// Lastly refesh the System Tray area so that any stopped programs disappear
TaskBarStuckRectangle.RefreshTrayArea();
return true;
}