Skip to content

Commit

Permalink
Merge pull request #478 from 123jimin/202105-window-pos-fix
Browse files Browse the repository at this point in the history
Fixed a problem where window position doesn't get updated after adjusting it
  • Loading branch information
Drewol authored May 30, 2021
2 parents 153a50c + f711311 commit 2322c4c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Main/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2322c4c

Please sign in to comment.