From e9510115039e7ae9fcf2778e8455e7beed3424ea Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 26 Jan 2025 15:05:34 +0000 Subject: renderer/internal: stop using box pointers in favor of const refs --- src/layout/IHyprLayout.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/layout/IHyprLayout.cpp') 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}; -- cgit v1.2.3