Skip to content

Commit

Permalink
layout: fix centering of new floating windows
Browse files Browse the repository at this point in the history
ref #6154
  • Loading branch information
vaxerski committed Jun 2, 2024
1 parent e08195d commit 358e59e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layout/IHyprLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 358e59e

Please sign in to comment.