summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-01-26 15:05:34 +0000
committerVaxry <vaxry@vaxry.net>2025-01-26 15:05:34 +0000
commite9510115039e7ae9fcf2778e8455e7beed3424ea (patch)
tree1c1d313f51082ebeb096aa33e53efc490125c07d /src/layout/IHyprLayout.cpp
parent16aeb24bc1395b46d675ec3522ed452e487f5b69 (diff)
renderer/internal: stop using box pointers
in favor of const refs
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 81392be9..5e5669b8 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -14,8 +14,7 @@
#include "../managers/HookSystemManager.hpp"
void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) {
- CBox desiredGeometry = {};
- g_pXWaylandManager->getGeometryForWindow(pWindow, &desiredGeometry);
+ CBox desiredGeometry = g_pXWaylandManager->getGeometryForWindow(pWindow);
if (desiredGeometry.width <= 5 || desiredGeometry.height <= 5) {
const auto PMONITOR = pWindow->m_pMonitor.lock();
@@ -91,9 +90,8 @@ void IHyprLayout::onWindowRemovedFloating(PHLWINDOW pWindow) {
void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
- CBox desiredGeometry = {0};
- g_pXWaylandManager->getGeometryForWindow(pWindow, &desiredGeometry);
- const auto PMONITOR = pWindow->m_pMonitor.lock();
+ CBox desiredGeometry = g_pXWaylandManager->getGeometryForWindow(pWindow);
+ const auto PMONITOR = pWindow->m_pMonitor.lock();
if (pWindow->m_bIsX11) {
Vector2D xy = {desiredGeometry.x, desiredGeometry.y};