This commit is contained in:
Kamil Dziedzic 2026-05-04 22:43:15 +00:00 committed by GitHub
commit cb83fddc1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,7 @@
#include <hyprland/src/event/EventBus.hpp>
#undef private
#include <hyprland/src/layout/space/Space.hpp>
#include "globals.hpp"
// Do NOT change this function
@ -94,6 +95,9 @@ void onNewWindow(PHLWINDOW pWindow) {
const Vector2D newPos = {static_cast<int>(monitorPos.x + (monitorSize.x * (px / 100.f))), static_cast<int>(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;