From ff013fa75a713810ae2814c8692ccd829bc7a4f9 Mon Sep 17 00:00:00 2001 From: Liam Sho Date: Tue, 28 Mar 2023 21:02:08 +0800 Subject: [PATCH] chore: use "is" operator --- src/MaaWpfGui/Helper/WindowManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }