Skip to content

Commit f3faef7

Browse files
committed
Update WindowLayout.cs
1 parent 28c5075 commit f3faef7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/MsExcelDiff/WindowLayout.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ internal static async Task MaximizeAndCenterSplits(Process process)
1414
// ShowWindow is synchronous — WinForms processes WM_SIZE and
1515
// lays out child controls before it returns, so no delay needed.
1616
ShowWindow(process.MainWindowHandle, 3);
17+
await Task.Delay(500);
1718
CenterSplits(process.MainWindowHandle);
1819
return;
1920
}
@@ -36,12 +37,12 @@ static void CenterSplits(IntPtr mainWindow)
3637
},
3738
IntPtr.Zero);
3839

39-
Log.Information("CenterSplits: found {Count} child windows", children.Count);
40+
Log.Debug("CenterSplits: found {Count} child windows", children.Count);
4041
foreach (var child in children)
4142
{
4243
var w = child.Rect.Right - child.Rect.Left;
4344
var h = child.Rect.Bottom - child.Rect.Top;
44-
Log.Information(
45+
Log.Debug(
4546
" hwnd={Handle} parent={Parent} class={ClassName} pos=({Left},{Top}) size={Width}x{Height}",
4647
child.Handle, child.Parent, child.ClassName,
4748
child.Rect.Left, child.Rect.Top, w, h);
@@ -145,7 +146,7 @@ static void CenterSplit(
145146

146147
if (matches.Count == 0)
147148
{
148-
Log.Information("CenterSplit({Orientation}): no matching pairs found", orientation);
149+
Log.Debug("CenterSplit({Orientation}): no matching pairs found", orientation);
149150
return;
150151
}
151152

@@ -178,7 +179,7 @@ static void CenterSplit(
178179
toClient.Y = client.Bottom / 2;
179180
}
180181

181-
Log.Information(
182+
Log.Debug(
182183
"CenterSplit({Orientation}): PostMessage drag client ({FromX},{FromY}) to ({ToX},{ToY})",
183184
orientation, fromScreen.X, fromScreen.Y, toClient.X, toClient.Y);
184185

0 commit comments

Comments
 (0)