turn off fast restore by default

This commit is contained in:
Kang Yu 2024-10-26 19:03:43 -07:00
parent 0d3d5c24f3
commit efc2d0bb67
2 changed files with 7 additions and 1 deletions

View file

@ -127,6 +127,7 @@ namespace PersistentWindows.Common
public int haltRestore = 3000; //milliseconds to wait to finish current halted restore and restart next one
private HashSet<IntPtr> restoredWindows = new HashSet<IntPtr>();
private HashSet<IntPtr> topmostWindowsFixed = new HashSet<IntPtr>();
public bool fastRestore = false;
public bool enableDualPosSwitch = true;
private HashSet<IntPtr> dualPosSwitchWindows = new HashSet<IntPtr>();
@ -845,7 +846,8 @@ namespace PersistentWindows.Common
this.displaySettingsChangedHandler =
(s, e) =>
{
process.PriorityClass = ProcessPriorityClass.High;
if (fastRestore)
process.PriorityClass = ProcessPriorityClass.High;
string displayKey = GetDisplayKey();
Log.Event("Display settings changed {0}", displayKey);
@ -3278,6 +3280,7 @@ namespace PersistentWindows.Common
normalSessions.Add(curDisplayKey);
Log.Trace("Restore timer expired");
process.PriorityClass = ProcessPriorityClass.High;
lock (restoreLock)
BatchRestoreApplicationsOnCurrentDisplays();

View file

@ -158,6 +158,9 @@ if not errorlevel 1 goto wait_to_finish";
case "-enable_auto_restore_by_manual_capture":
pwp.manualNormalSession = true;
break;
case "-fast_restore":
pwp.fastRestore = true;
break;
case "-delay_restart":
delay_restart = 1;
break;