mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-05-07 19:28:00 +02:00
Merge 9753dedee3 into 473804b359
This commit is contained in:
commit
cb83fddc1a
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue