From f711311e18eb7b93c7f9a70a566e3e3f343ae121 Mon Sep 17 00:00:00 2001 From: Jimin Park Date: Sun, 30 May 2021 20:17:50 +0900 Subject: [PATCH] Store window position after adjusting it in Application::m_UpdateWindowPosAndShape --- Main/src/Application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Main/src/Application.cpp b/Main/src/Application.cpp index fff667d5d..8f9d8cfca 100644 --- a/Main/src/Application.cpp +++ b/Main/src/Application.cpp @@ -1966,6 +1966,13 @@ void Application::m_UpdateWindowPosAndShape(int32 monitorId, bool fullscreen, bo fullscreen, g_gameConfig.GetBool(GameConfigKeys::WindowedFullscreen), windowPos, windowSize, monitorId, fullscreenSize }, ensureInBound); + + if (ensureInBound && !fullscreen) + { + Vector2i windowPos = g_gameWindow->GetWindowPos(); + g_gameConfig.Set(GameConfigKeys::ScreenX, windowPos.x); + g_gameConfig.Set(GameConfigKeys::ScreenY, windowPos.y); + } } void Application::m_OnFocusChanged(bool focused)