add command -dump_window_pos_at_exit=0

This commit is contained in:
Kang Yu 2024-07-13 15:30:27 -07:00
parent 5fc803757a
commit 63334fa67c
2 changed files with 8 additions and 2 deletions

View file

@ -137,6 +137,7 @@ namespace PersistentWindows.Common
"chrome", "firefox", "msedge", "vivaldi", "opera", "brave", "360ChromeX"
};
public bool dumpDataWhenExit = true;
private string windowPosDataFile = "window_pos.xml";
private string snapshotTimeFile = "snapshot_time.xml";
@ -247,6 +248,7 @@ namespace PersistentWindows.Common
{
try
{
if (dumpDataWhenExit)
ReadDataDump();
}
catch (Exception e)

View file

@ -263,6 +263,9 @@ namespace PersistentWindows.SystrayShell
case "-auto_upgrade=1":
auto_upgrade = true;
break;
case "-dump_window_pos_at_exit=0":
pwp.dumpDataWhenExit = false;
break;
}
}
@ -778,6 +781,7 @@ namespace PersistentWindows.SystrayShell
{
try
{
if (pwp.dumpDataWhenExit)
pwp.WriteDataDump();
}
catch (Exception e)