mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
speedup inheritance in case window create event is delayed
This commit is contained in:
parent
cad1ec393f
commit
f7eb0abe43
1 changed files with 5 additions and 1 deletions
|
@ -34,7 +34,7 @@ namespace PersistentWindows.Common
|
||||||
public int UserForcedRestoreLatency = 0;
|
public int UserForcedRestoreLatency = 0;
|
||||||
private const int CaptureLatency = 3000; // delay in milliseconds from window OS move to capture
|
private const int CaptureLatency = 3000; // delay in milliseconds from window OS move to capture
|
||||||
private const int UserMoveLatency = 1000; // delay in milliseconds from user move/minimize/unminimize/maximize to capture, must < CaptureLatency
|
private const int UserMoveLatency = 1000; // delay in milliseconds from user move/minimize/unminimize/maximize to capture, must < CaptureLatency
|
||||||
private const int ForegroundTimerLatency = UserMoveLatency / 5;
|
private const int ForegroundTimerLatency = UserMoveLatency / 4;
|
||||||
private const int MaxUserMoves = 4; // max user window moves per capture cycle
|
private const int MaxUserMoves = 4; // max user window moves per capture cycle
|
||||||
private const int MinWindowOsMoveEvents = 12; // threshold of window move events initiated by OS per capture cycle
|
private const int MinWindowOsMoveEvents = 12; // threshold of window move events initiated by OS per capture cycle
|
||||||
private const int MaxSnapshots = 38; // 0-9, a-z, ` (for redo last auto restore) and final one for undo last snapshot restore
|
private const int MaxSnapshots = 38; // 0-9, a-z, ` (for redo last auto restore) and final one for undo last snapshot restore
|
||||||
|
@ -483,6 +483,10 @@ namespace PersistentWindows.Common
|
||||||
}
|
}
|
||||||
else if (fullScreenGamingWindow == IntPtr.Zero)
|
else if (fullScreenGamingWindow == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
//create window event may be delayed
|
||||||
|
if (hwnd != IntPtr.Zero)
|
||||||
|
CaptureWindow(hwnd, 0, DateTime.Now, curDisplayKey);
|
||||||
|
|
||||||
StartCaptureTimer();
|
StartCaptureTimer();
|
||||||
|
|
||||||
//speed up initial capture
|
//speed up initial capture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue