From 13cd0ab8d59f67f61efaeebbdd9f1e22db1e9049 Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Thu, 30 Jan 2025 19:29:10 -0800 Subject: [PATCH] no auto inherit when restore from db --- .../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 e1c0bda..7e37a55 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -1999,6 +1999,9 @@ namespace PersistentWindows.Common // ignore non-window object (caret etc) return; + if (restoringFromDB) + return; + if (freezeCapture || !monitorApplications.ContainsKey(curDisplayKey)) return; @@ -2022,7 +2025,6 @@ namespace PersistentWindows.Common DateTime now = DateTime.Now; - //restore windows of the same process name ApplicationDisplayMetrics curDisplayMetrics; ApplicationDisplayMetrics prevDisplayMetrics; //try to inherit from killed window database