mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
fix crash
This commit is contained in:
parent
0d6940b6ec
commit
fffdf03c10
1 changed files with 6 additions and 1 deletions
|
@ -552,11 +552,13 @@ namespace PersistentWindows.Common
|
|||
{
|
||||
if (!sessionActive) //disable foreground event handling
|
||||
return;
|
||||
|
||||
IntPtr hwnd = foreGroundWindow;
|
||||
if (!User32.IsWindow(hwnd))
|
||||
return;
|
||||
|
||||
if (hwnd == fullScreenGamingWindow)
|
||||
return;
|
||||
|
||||
if (noRestoreWindows.Contains(hwnd))
|
||||
return;
|
||||
|
||||
|
@ -629,6 +631,9 @@ namespace PersistentWindows.Common
|
|||
|
||||
if (!monitorApplications[curDisplayKey].ContainsKey(hwnd))
|
||||
{
|
||||
if (!normalSessions.Contains(curDisplayKey))
|
||||
return;
|
||||
|
||||
var appWindows = CaptureWindowsOfInterest();
|
||||
DateTime now = DateTime.Now;
|
||||
foreach (var h in appWindows)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue