summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-06-02 23:05:02 +0200
committerVaxry <vaxry@vaxry.net>2024-06-03 18:46:20 +0200
commit3fd6c1b30e5397432c4640286efaf52a6891f71c (patch)
treeaf1528b3fa5748e5756f91918430825f412b9dd2 /src/layout/IHyprLayout.cpp
parenteaecf7db14cff793e46c432edf68fef58b43373b (diff)
layout: fix centering of new floating windows
ref #6154
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 108f9039..7fadf188 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -147,7 +147,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
pWindow->m_vRealPosition = pWindow->m_pXDGSurface->toplevel->parent->window->m_vRealPosition.goal() +
pWindow->m_pXDGSurface->toplevel->parent->window->m_vRealSize.goal() / 2.F - desiredGeometry.size() / 2.F;
else
- pWindow->m_vRealPosition = PMONITOR->vecPosition + desiredGeometry.size() / 2.F;
+ pWindow->m_vRealPosition = PMONITOR->vecPosition + PMONITOR->vecSize / 2.F - desiredGeometry.size() / 2.F;
} else {
// if it is, we respect where it wants to put itself, but apply monitor offset if outside
// most of these are popups