Skip to content

Commit 24750cf

Browse files
committed
Code quality: Improved code quality
1 parent 6c36665 commit 24750cf

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Files.App/MainWindow.xaml.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,10 @@ public bool SetCanWindowToFront(bool canWindowToFront)
356356
private const int WM_WINDOWPOSCHANGING = 0x0046;
357357
private void WindowManager_WindowMessageReceived(object? sender, WinUIEx.Messaging.WindowMessageEventArgs e)
358358
{
359-
if (!CanWindowToFront)
359+
if ((!CanWindowToFront) && e.Message.MessageId == WM_WINDOWPOSCHANGING)
360360
{
361-
if (e.Message.MessageId == WM_WINDOWPOSCHANGING)
362-
{
363-
Win32Helper.ForceWindowPosition(e.Message.LParam);
364-
e.Handled = true;
365-
}
361+
Win32Helper.ForceWindowPosition(e.Message.LParam);
362+
e.Handled = true;
366363
}
367364
}
368365
}

0 commit comments

Comments
 (0)