diff --git a/src/MaaWpfGui/Helper/WindowManager.cs b/src/MaaWpfGui/Helper/WindowManager.cs index 05fca07d5e..cc4b748fc3 100644 --- a/src/MaaWpfGui/Helper/WindowManager.cs +++ b/src/MaaWpfGui/Helper/WindowManager.cs @@ -72,7 +72,7 @@ namespace MaaWpfGui.Helper // In Stylet, CreateWindow().WindowStartupLocation is CenterScreen or CenterOwner (if w.WSLoc == Manual && w.Left == NaN && w.Top == NaN && ...) window.WindowStartupLocation = WindowStartupLocation.Manual; - if (window.GetType() == typeof(RootView)) + if (window is RootView) { MoveWindowToDisplay(ScreenName, window); }