From 5edc32930d85f5f481160b938965c8bc329487e7 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 30 Apr 2024 02:41:27 +0100 Subject: layerSurface: refactor/move to a memory-safe impl Makes all the pointers smart to avoid memory issues Refactors layerSurface code to live inside desktop/layersurface --- src/managers/input/InputManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 47dc2bf6..72c1772c 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -120,13 +120,13 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { const auto FOLLOWMOUSE = *PFOLLOWONDND && m_sDrag.drag ? 1 : *PFOLLOWMOUSE; m_pFoundSurfaceToFocus = nullptr; - m_pFoundLSToFocus = nullptr; + m_pFoundLSToFocus.reset(); m_pFoundWindowToFocus.reset(); - wlr_surface* foundSurface = nullptr; - Vector2D surfaceCoords; - Vector2D surfacePos = Vector2D(-1337, -1337); - PHLWINDOW pFoundWindow; - SLayerSurface* pFoundLayerSurface = nullptr; + wlr_surface* foundSurface = nullptr; + Vector2D surfaceCoords; + Vector2D surfacePos = Vector2D(-1337, -1337); + PHLWINDOW pFoundWindow; + PHLLS pFoundLayerSurface; if (!g_pCompositor->m_bReadyToProcess || g_pCompositor->m_bIsShuttingDown || g_pCompositor->m_bUnsafeState) return; -- cgit v1.2.3