summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-04-30 02:41:27 +0100
committerVaxry <vaxry@vaxry.net>2024-04-30 02:41:27 +0100
commit5edc32930d85f5f481160b938965c8bc329487e7 (patch)
tree3609cb2bebd1f72e17605022e2b9a2dd526377f6 /src/managers/input/InputManager.cpp
parent5e6f7b1cdb72b394ad8556bb232ac8a406d851b4 (diff)
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
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp12
1 files changed, 6 insertions, 6 deletions
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;