From 49267a5777bbb75c989095458289f2f5ec24b202 Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Mon, 13 Feb 2023 14:00:52 +0900 Subject: [PATCH] Allow Windows+Shift+Left/Right when in non-window mode --- Dalamud.Boot/xivfixes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dalamud.Boot/xivfixes.cpp b/Dalamud.Boot/xivfixes.cpp index bfbca7d8a..21786a4c1 100644 --- a/Dalamud.Boot/xivfixes.cpp +++ b/Dalamud.Boot/xivfixes.cpp @@ -198,7 +198,10 @@ void xivfixes::prevent_devicechange_crashes(bool bApply) { } // While at it, prevent game from entering restored mode if the game does not have window frames (borderless window/fullscreen.) - if (uMsg == WM_SIZE && wParam == SIZE_RESTORED && (GetWindowLongW(hWnd, GWL_STYLE) & WS_POPUP)) + if (uMsg == WM_SIZE && wParam == SIZE_RESTORED + && (GetWindowLongW(hWnd, GWL_STYLE) & WS_POPUP) // Is the game not in windowed mode? + && !((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x8000) // Allow Win+Shift+Left/Right key combinations to temporarily restore the window to let it move across displays. + ) return ShowWindow(hWnd, SW_MAXIMIZE); return s_pfnGameWndProc(hWnd, uMsg, wParam, lParam);