mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 13:35:39 +02:00
fix issue #102: add option -fix_unminimized_window=0
This commit is contained in:
parent
8dfa19ac12
commit
fd20331cac
3 changed files with 11 additions and 2 deletions
3
Help.md
3
Help.md
|
@ -10,7 +10,8 @@
|
||||||
| -halt_restore \<seconds\> | Delay auto restore by specified seconds in case monitor fails to go to sleep due to fast off-on-off switching.
|
| -halt_restore \<seconds\> | Delay auto restore by specified seconds in case monitor fails to go to sleep due to fast off-on-off switching.
|
||||||
| -redraw_desktop | redraw whole desktop windows after restore
|
| -redraw_desktop | redraw whole desktop windows after restore
|
||||||
| -fix_zorder=1 | Turn on z-order fix for automatic restore
|
| -fix_zorder=1 | Turn on z-order fix for automatic restore
|
||||||
| -fix_offscreen=0 | Turn off auto correction of off-screen window
|
| -fix_offscreen_window=0 | Turn off auto correction of off-screen window
|
||||||
|
| -fix_unminimized_window=0 | Turn off auto restore of unminimized window
|
||||||
| ‑auto_restore_missing_windows=1 | Restore missing windows from disk without prompting user
|
| ‑auto_restore_missing_windows=1 | Restore missing windows from disk without prompting user
|
||||||
| ‑auto_restore_missing_windows=2 | Automatic restore missing windows from disk at startup, user will be prompted before restore each missing window
|
| ‑auto_restore_missing_windows=2 | Automatic restore missing windows from disk at startup, user will be prompted before restore each missing window
|
||||||
| ‑auto_restore_missing_windows=3 | Automatic restore missing windows from disk at startup without prompting user
|
| ‑auto_restore_missing_windows=3 | Automatic restore missing windows from disk at startup without prompting user
|
||||||
|
|
|
@ -93,6 +93,7 @@ namespace Ninjacrab.PersistentWindows.Common
|
||||||
public bool redrawDesktop = false;
|
public bool redrawDesktop = false;
|
||||||
public bool enableOffScreenFix = true;
|
public bool enableOffScreenFix = true;
|
||||||
public bool enhancedOffScreenFix = false;
|
public bool enhancedOffScreenFix = false;
|
||||||
|
public bool fixUnminimizedWindow = true;
|
||||||
public bool autoRestoreMissingWindows = false;
|
public bool autoRestoreMissingWindows = false;
|
||||||
private int restoreTimes = 0; //multiple passes need to fully restore
|
private int restoreTimes = 0; //multiple passes need to fully restore
|
||||||
private bool restoreHalted = false;
|
private bool restoreHalted = false;
|
||||||
|
@ -968,7 +969,7 @@ namespace Ninjacrab.PersistentWindows.Common
|
||||||
if (screenPosition.Equals(rect))
|
if (screenPosition.Equals(rect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!tidyTabWindows.Contains(hwnd))
|
if (fixUnminimizedWindow && !tidyTabWindows.Contains(hwnd))
|
||||||
{
|
{
|
||||||
//restore minimized window only applies if screen resolution has changed since minimize
|
//restore minimized window only applies if screen resolution has changed since minimize
|
||||||
if (prevDisplayMetrics.CaptureTime < lastDisplayChangeTime)
|
if (prevDisplayMetrics.CaptureTime < lastDisplayChangeTime)
|
||||||
|
|
|
@ -38,6 +38,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
bool fix_zorder_specified = false;
|
bool fix_zorder_specified = false;
|
||||||
bool redraw_desktop = false;
|
bool redraw_desktop = false;
|
||||||
bool offscreen_fix = true;
|
bool offscreen_fix = true;
|
||||||
|
bool fix_unminimized_window = true;
|
||||||
bool enhanced_offscreen_fix = false;
|
bool enhanced_offscreen_fix = false;
|
||||||
bool auto_restore_missing_windows = false;
|
bool auto_restore_missing_windows = false;
|
||||||
bool auto_restore_from_db_at_startup = false;
|
bool auto_restore_from_db_at_startup = false;
|
||||||
|
@ -82,8 +83,13 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
break;
|
break;
|
||||||
case "-offscreen_fix=0":
|
case "-offscreen_fix=0":
|
||||||
case "-fix_offscreen=0":
|
case "-fix_offscreen=0":
|
||||||
|
case "-fix_offscreen_window=0":
|
||||||
offscreen_fix = false;
|
offscreen_fix = false;
|
||||||
break;
|
break;
|
||||||
|
case "-fix_unminimized=0":
|
||||||
|
case "-fix_unminimized_window=0":
|
||||||
|
fix_unminimized_window = false;
|
||||||
|
break;
|
||||||
case "-prompt_session_restore":
|
case "-prompt_session_restore":
|
||||||
prompt_session_restore = true;
|
prompt_session_restore = true;
|
||||||
break;
|
break;
|
||||||
|
@ -198,6 +204,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||||
pwp.redirectAppDataFolder = redirect_appdata;
|
pwp.redirectAppDataFolder = redirect_appdata;
|
||||||
pwp.enhancedOffScreenFix = enhanced_offscreen_fix;
|
pwp.enhancedOffScreenFix = enhanced_offscreen_fix;
|
||||||
pwp.enableOffScreenFix = offscreen_fix;
|
pwp.enableOffScreenFix = offscreen_fix;
|
||||||
|
pwp.fixUnminimizedWindow = fix_unminimized_window;
|
||||||
pwp.promptSessionRestore = prompt_session_restore;
|
pwp.promptSessionRestore = prompt_session_restore;
|
||||||
pwp.autoRestoreMissingWindows = auto_restore_missing_windows;
|
pwp.autoRestoreMissingWindows = auto_restore_missing_windows;
|
||||||
pwp.haltRestore = halt_restore;
|
pwp.haltRestore = halt_restore;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue