diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 1222570..f9516b3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -2,3 +2,5 @@ * Added workaround for CJ4 CDU panel not popping out because of MSFS bug. * Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50. + +* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration. diff --git a/VERSION.md b/VERSION.md index b1b36a4..997733a 100644 --- a/VERSION.md +++ b/VERSION.md @@ -6,6 +6,8 @@ * Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50. +* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration. + ## Version 4.0.1.2 * Hotfix - Fixed issue where using touch panel feature may freeze computer and the application. diff --git a/WindowsAgent/InputEmulationManager.cs b/WindowsAgent/InputEmulationManager.cs index a62f444..ed3bd7a 100644 --- a/WindowsAgent/InputEmulationManager.cs +++ b/WindowsAgent/InputEmulationManager.cs @@ -114,6 +114,9 @@ namespace MSFSPopoutPanelManager.WindowsAgent PInvoke.SetForegroundWindow(hwnd); Thread.Sleep(200); + PInvoke.SetFocus(hwnd); + Thread.Sleep(300); + // Set view using Ctrl-Alt-0 PInvoke.keybd_event(Convert.ToByte(VK_LCONTROL), 0, KEYEVENTF_KEYDOWN, 0); PInvoke.keybd_event(Convert.ToByte(VK_LMENU), 0, KEYEVENTF_KEYDOWN, 0); @@ -151,6 +154,9 @@ namespace MSFSPopoutPanelManager.WindowsAgent PInvoke.SetForegroundWindow(hwnd); Thread.Sleep(200); + PInvoke.SetFocus(hwnd); + Thread.Sleep(300); + PInvoke.keybd_event(Convert.ToByte(VK_RMENU), 0, KEYEVENTF_KEYDOWN, 0); PInvoke.keybd_event(Convert.ToByte(VK_ENT), 0, KEYEVENTF_KEYDOWN, 0); Thread.Sleep(200); diff --git a/WindowsAgent/PInvoke.cs b/WindowsAgent/PInvoke.cs index 17ab4cf..e240651 100644 --- a/WindowsAgent/PInvoke.cs +++ b/WindowsAgent/PInvoke.cs @@ -123,6 +123,9 @@ namespace MSFSPopoutPanelManager.WindowsAgent [DllImport("user32.dll", SetLastError = true)] public static extern bool SetForegroundWindow(IntPtr hwnd); + [DllImport("user32.dll", SetLastError = true)] + public static extern IntPtr SetFocus(IntPtr hwnd); + [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern IntPtr SendMessage(IntPtr hwnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);