mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
#158, add switch to disable auto restore window to last capture
This commit is contained in:
parent
b392ac84f9
commit
9e63a2b853
2 changed files with 7 additions and 2 deletions
|
@ -120,6 +120,7 @@ namespace PersistentWindows.Common
|
|||
public bool fixUnminimizedWindow = true;
|
||||
public bool autoRestoreMissingWindows = false;
|
||||
public bool autoRestoreLiveWindowsFromDb = true; //for new display session, autorestore live windows using data from db (without resurrecting dead one)
|
||||
public bool autoRestoreNewWindowToLastCapture = true;
|
||||
public bool launchOncePerProcessId = true;
|
||||
private int restoreTimes = 0; //multiple passes need to fully restore
|
||||
private Object restoreLock = new object();
|
||||
|
@ -3098,7 +3099,8 @@ namespace PersistentWindows.Common
|
|||
else
|
||||
Log.Error($"Inherit position data from existing window 0x{kid.ToString("X")} for {curDisplayMetrics.Title}");
|
||||
|
||||
restore_last = true;
|
||||
if (autoRestoreNewWindowToLastCapture)
|
||||
restore_last = true;
|
||||
}
|
||||
|
||||
//newly created window or new display setting
|
||||
|
|
|
@ -254,9 +254,12 @@ if not errorlevel 1 goto wait_to_finish";
|
|||
case "-redraw_desktop":
|
||||
redraw_desktop = true;
|
||||
break;
|
||||
case "-auto_restore_last_capture_at_startup=0":
|
||||
case "-auto_restore_existing_window_to_last_capture=0":
|
||||
auto_restore_last_capture_at_startup = false;
|
||||
break;
|
||||
case "-auto_restore_new_window_to_last_capture=0":
|
||||
pwp.autoRestoreNewWindowToLastCapture = false;
|
||||
break;
|
||||
case "-auto_restore_missing_windows":
|
||||
case "-auto_restore_missing_windows=1":
|
||||
auto_restore_missing_windows = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue