diff --git a/Model/PanelType.cs b/Model/PanelType.cs index bdddfca..f1925a9 100644 --- a/Model/PanelType.cs +++ b/Model/PanelType.cs @@ -6,6 +6,7 @@ BuiltInPopout, CustomPopout, MSFSTouchPanel, - WPFWindow + WPFWindow, + MultiMonitorWindow } } diff --git a/Provider/InputEmulationManager.cs b/Provider/InputEmulationManager.cs index a9545f6..ce4d8d1 100644 --- a/Provider/InputEmulationManager.cs +++ b/Provider/InputEmulationManager.cs @@ -22,6 +22,7 @@ namespace MSFSPopoutPanelManager.Provider public static void LeftClick(int x, int y) { + PInvoke.SetCursorPos(x, y); PInvoke.SetCursorPos(x, y); Thread.Sleep(300); @@ -42,6 +43,7 @@ namespace MSFSPopoutPanelManager.Provider LeftClick(x, y); Thread.Sleep(300); + PInvoke.SetCursorPos(x, y); PInvoke.SetCursorPos(x, y); Thread.Sleep(300); diff --git a/Provider/PanelPopoutManager.cs b/Provider/PanelPopoutManager.cs index fa41863..ba77dbe 100644 --- a/Provider/PanelPopoutManager.cs +++ b/Provider/PanelPopoutManager.cs @@ -382,6 +382,8 @@ namespace MSFSPopoutPanelManager.Provider panelInfo.PanelType = PanelType.CustomPopout; else if (caption.IndexOf("Microsoft Flight Simulator") > -1) // MSFS main game window return null; + else if (caption.IndexOf("WINDOW") > -1) + panelInfo.PanelType = PanelType.MultiMonitorWindow; else panelInfo.PanelType = PanelType.BuiltInPopout; diff --git a/Provider/WindowManager.cs b/Provider/WindowManager.cs index c811c5b..5ca3421 100644 --- a/Provider/WindowManager.cs +++ b/Provider/WindowManager.cs @@ -136,11 +136,14 @@ namespace MSFSPopoutPanelManager.Provider var className = PInvoke.GetClassName(hwnd); var caption = PInvoke.GetWindowText(hwnd); + if (className == "AceApp" && caption.IndexOf("WINDOW") > -1) // For multi monitor window, do nothing + return true; + if (className == "AceApp" && (caption.IndexOf("(Custom)") > -1 || caption == String.Empty)) // Only close non-builtin pop out panels { WindowManager.CloseWindow(hwnd); } - else if (className == "AceApp" && caption.IndexOf("Microsoft Flight Simulator") == -1) // for builtin pop out (ATC, VFR Map, ect) + else if (className == "AceApp" && caption.IndexOf("Microsoft Flight Simulator") == -1) // For builtin pop out (ATC, VFR Map, ect) { WindowManager.MoveWindow(hwnd, 0, 0); } diff --git a/VERSION.md b/VERSION.md index d7c2c89..11fa5fe 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1,6 +1,9 @@ # Version History