From d5689bb53935ff1adbbfc9fdf5b1f542ce39efb2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 26 Oct 2024 02:06:13 +0100 Subject: internal: cleanup CMonitor usage and fix a few ref hogs ref #8221 --- src/Compositor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 313d57ac..743895aa 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -750,7 +750,7 @@ PHLMONITOR CCompositor::getMonitorFromCursor() { } PHLMONITOR CCompositor::getMonitorFromVector(const Vector2D& point) { - SP mon; + PHLMONITOR mon; for (auto const& m : m_vMonitors) { if (CBox{m->vecPosition, m->vecSize}.containsPoint(point)) { mon = m; @@ -759,8 +759,8 @@ PHLMONITOR CCompositor::getMonitorFromVector(const Vector2D& point) { } if (!mon) { - float bestDistance = 0.f; - SP pBestMon; + float bestDistance = 0.f; + PHLMONITOR pBestMon; for (auto const& m : m_vMonitors) { float dist = vecToRectDistanceSquared(point, m->vecPosition, m->vecPosition + m->vecSize); @@ -3008,7 +3008,7 @@ PHLWINDOW CCompositor::windowForCPointer(CWindow* pWindow) { return {}; } -static void checkDefaultCursorWarp(SP monitor) { +static void checkDefaultCursorWarp(PHLMONITOR monitor) { static auto PCURSORMONITOR = CConfigValue("cursor:default_monitor"); static bool cursorDefaultDone = false; static bool firstLaunch = true; -- cgit v1.2.3