diff --git a/hyprwinwrap/main.cpp b/hyprwinwrap/main.cpp index 5cb2d00..59ad8d9 100644 --- a/hyprwinwrap/main.cpp +++ b/hyprwinwrap/main.cpp @@ -18,6 +18,7 @@ #include #undef private +#include #include "globals.hpp" // Do NOT change this function @@ -94,6 +95,9 @@ void onNewWindow(PHLWINDOW pWindow) { const Vector2D newPos = {static_cast(monitorPos.x + (monitorSize.x * (px / 100.f))), static_cast(monitorPos.y + (monitorSize.y * (py / 100.f)))}; + const CBox b(newPos.x, newPos.y, newSize.x, newSize.y); + + pWindow->layoutTarget()->space()->setTargetGeom(b, pWindow->layoutTarget()); pWindow->m_realSize->setValueAndWarp(newSize); pWindow->m_realPosition->setValueAndWarp(newPos); pWindow->m_size = newSize;