From 70dea56d44f310ef64a95cb5e74b7655e1f2291e Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 14 Jul 2024 14:08:20 +0300 Subject: [PATCH] Fix centered window location on X11 --- Source/Engine/Platform/Base/WindowBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Platform/Base/WindowBase.cpp b/Source/Engine/Platform/Base/WindowBase.cpp index 6705c02b8..218c04abf 100644 --- a/Source/Engine/Platform/Base/WindowBase.cpp +++ b/Source/Engine/Platform/Base/WindowBase.cpp @@ -106,7 +106,7 @@ WindowBase::WindowBase(const CreateWindowSettings& settings) if (settings.StartPosition == WindowStartPosition::CenterParent || settings.StartPosition == WindowStartPosition::CenterScreen) { - Rectangle parentBounds = Rectangle(Float2::Zero, Platform::GetDesktopSize()); + Rectangle parentBounds = Platform::GetMonitorBounds(Float2::Minimum); if (settings.Parent != nullptr && settings.StartPosition == WindowStartPosition::CenterParent) parentBounds = settings.Parent->GetClientBounds();