From 557a3bbddb68cfaba54f2036acdd39c6578b1cb4 Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Mon, 17 Mar 2025 14:29:11 -0700 Subject: [PATCH] #369, #388, #392: newly created window auto-restored to wrong place due to matching to incorrect entry with different window title --- .../Common/PersistentWindowProcessor.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs index b0b1419..535de20 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -1458,7 +1458,6 @@ namespace PersistentWindows.Common if (!string.IsNullOrEmpty(className)) { - IntPtr dflt_kid = IntPtr.Zero; int title_match_cnt = 0; IntPtr title_match_hid = IntPtr.Zero; IntPtr pos_match_hid = IntPtr.Zero; @@ -1494,8 +1493,6 @@ namespace PersistentWindows.Common } else if (rect.Equals(r)) pos_match_hid = kid; - else if (dflt_kid == IntPtr.Zero) - dflt_kid = kid; } if (title_match_cnt == 1) @@ -1503,9 +1500,6 @@ namespace PersistentWindows.Common if (pos_match_hid != IntPtr.Zero) return pos_match_hid; - - if (dflt_kid != IntPtr.Zero) - return dflt_kid; } return IntPtr.Zero;