diff options
| author | jmanc3 <jman12316@live.com> | 2025-09-09 06:56:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-09 12:56:33 +0100 |
| commit | ecc9e4d8cd7a86f5f7d7541bee9b092122d2fa83 (patch) | |
| tree | fb43842920034209a79687e6e70829972b63ac79 /src/layout | |
| parent | 1e3a06560fa6b2d906f8ecc9ec41b50e9b034cef (diff) | |
window: fix centering calculation for floating windows (#11632)
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 7aea3190..464825c4 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -166,7 +166,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) { // otherwise middle of parent if available if (!pWindow->m_isX11) { if (const auto PARENT = pWindow->parent(); PARENT) { - *pWindow->m_realPosition = PARENT->m_position + PARENT->m_size / 2.F - desiredGeometry.size() / 2.F; + *pWindow->m_realPosition = PARENT->m_realPosition->goal() + PARENT->m_realSize->goal() / 2.F - desiredGeometry.size() / 2.F; pWindow->m_workspace = PARENT->m_workspace; pWindow->m_monitor = PARENT->m_monitor; centeredOnParent = true; |
