mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
#335, fix random failure to display context menu
This commit is contained in:
parent
411b73d971
commit
630c16ac57
1 changed files with 3 additions and 4 deletions
|
@ -313,6 +313,7 @@ namespace PersistentWindows.Common
|
|||
}
|
||||
|
||||
curDisplayKey = GetDisplayKey();
|
||||
CaptureNewDisplayConfig(curDisplayKey);
|
||||
|
||||
#if DEBUG
|
||||
//TestSetWindowPos();
|
||||
|
@ -792,8 +793,6 @@ namespace PersistentWindows.Common
|
|||
|
||||
SystemEvents.SessionSwitch += sessionSwitchEventHandler;
|
||||
|
||||
CaptureNewDisplayConfig(curDisplayKey);
|
||||
|
||||
initialized = true;
|
||||
remoteSession = System.Windows.Forms.SystemInformation.TerminalServerSession;
|
||||
Log.Event($"Display config is {curDisplayKey}");
|
||||
|
@ -2436,8 +2435,8 @@ namespace PersistentWindows.Common
|
|||
processCmd.Clear();
|
||||
}
|
||||
}
|
||||
else if (time_from_last_kill_window.TotalMilliseconds < 200
|
||||
|| (!userMovePrev && !immediateCapture && pendingEventCnt > MinWindowOsMoveEvents))
|
||||
else if (initialized && (time_from_last_kill_window.TotalMilliseconds < 200
|
||||
|| (!userMovePrev && !immediateCapture && pendingEventCnt > MinWindowOsMoveEvents)))
|
||||
{
|
||||
// too many pending window moves, they are probably initiated by OS instead of user,
|
||||
// defer capture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue