mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
speed up auto-restore by setting high PW process priority early
This commit is contained in:
parent
9cb7fd2e90
commit
ee8603c5b6
1 changed files with 5 additions and 2 deletions
|
@ -845,6 +845,8 @@ namespace PersistentWindows.Common
|
|||
this.displaySettingsChangedHandler =
|
||||
(s, e) =>
|
||||
{
|
||||
process.PriorityClass = ProcessPriorityClass.High;
|
||||
|
||||
string displayKey = GetDisplayKey();
|
||||
Log.Event("Display settings changed {0}", displayKey);
|
||||
|
||||
|
@ -3276,8 +3278,6 @@ namespace PersistentWindows.Common
|
|||
|
||||
Log.Trace("Restore timer expired");
|
||||
|
||||
process.PriorityClass = ProcessPriorityClass.High;
|
||||
|
||||
lock (restoreLock)
|
||||
BatchRestoreApplicationsOnCurrentDisplays();
|
||||
}
|
||||
|
@ -3530,6 +3530,9 @@ namespace PersistentWindows.Common
|
|||
|
||||
private bool MoveTaskBar(IntPtr hwnd, RECT targetRect)
|
||||
{
|
||||
if (restoreTimes != 2)
|
||||
return false;
|
||||
|
||||
// simulate mouse drag, assuming taskbar is unlocked
|
||||
/*
|
||||
ControlGetPos x, y, w, h, MSTaskListWClass1, ahk_class Shell_TrayWnd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue