From 304c654e80efa2eb35a6b17c35b43b10a86a8017 Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Thu, 1 May 2025 14:55:44 -0700 Subject: [PATCH] inherit window in stack order (last kill, first inherit) --- .../Common/PersistentWindowProcessor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs index 2f15a7b..ccf7e96 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -1984,7 +1984,9 @@ namespace PersistentWindows.Common } // for matching new window with killed one - monitorApplications[display_config][hwnd].Last().ProcessName = windowProcessName[hwnd]; + var dm = monitorApplications[display_config][hwnd].Last(); + if (dm.SnapShotFlags == 0) + dm.CaptureTime = DateTime.Now; //for inheritence in LIFO stile deadApps[display_config][hwnd] = monitorApplications[display_config][hwnd];