refine inherit log message

This commit is contained in:
Kang Yu 2024-08-28 14:20:10 -07:00
parent 452ef9017c
commit 800b6afa15

View file

@ -2844,7 +2844,10 @@ namespace PersistentWindows.Common
if (kid != IntPtr.Zero)
{
InheritKilledWindow(hwnd, kid);
Log.Error($"Inherit position data from killed window 0x{kid.ToString("X")} for {curDisplayMetrics.Title}");
if (hwnd != kid)
Log.Error($"Inherit position data from killed window 0x{kid.ToString("X")} for {curDisplayMetrics.Title}");
else
Log.Error($"Inherit position data from existing window 0x{kid.ToString("X")} for {curDisplayMetrics.Title}");
}
//newly created window or new display setting