mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +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();
|
curDisplayKey = GetDisplayKey();
|
||||||
|
CaptureNewDisplayConfig(curDisplayKey);
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
//TestSetWindowPos();
|
//TestSetWindowPos();
|
||||||
|
@ -792,8 +793,6 @@ namespace PersistentWindows.Common
|
||||||
|
|
||||||
SystemEvents.SessionSwitch += sessionSwitchEventHandler;
|
SystemEvents.SessionSwitch += sessionSwitchEventHandler;
|
||||||
|
|
||||||
CaptureNewDisplayConfig(curDisplayKey);
|
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
remoteSession = System.Windows.Forms.SystemInformation.TerminalServerSession;
|
remoteSession = System.Windows.Forms.SystemInformation.TerminalServerSession;
|
||||||
Log.Event($"Display config is {curDisplayKey}");
|
Log.Event($"Display config is {curDisplayKey}");
|
||||||
|
@ -2436,8 +2435,8 @@ namespace PersistentWindows.Common
|
||||||
processCmd.Clear();
|
processCmd.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (time_from_last_kill_window.TotalMilliseconds < 200
|
else if (initialized && (time_from_last_kill_window.TotalMilliseconds < 200
|
||||||
|| (!userMovePrev && !immediateCapture && pendingEventCnt > MinWindowOsMoveEvents))
|
|| (!userMovePrev && !immediateCapture && pendingEventCnt > MinWindowOsMoveEvents)))
|
||||||
{
|
{
|
||||||
// too many pending window moves, they are probably initiated by OS instead of user,
|
// too many pending window moves, they are probably initiated by OS instead of user,
|
||||||
// defer capture
|
// defer capture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue