From 788a8f7c134a34085d683e44a328e344be6b21f3 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:00:58 +0000 Subject: internal: wrap wlr surfaces (#1822) --- src/managers/input/InputManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 738e1011..5929e7ff 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -130,7 +130,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } if (CONSTRAINTWINDOW->m_bIsX11) { - foundSurface = g_pXWaylandManager->getWindowSurface(CONSTRAINTWINDOW); + foundSurface = CONSTRAINTWINDOW->m_pWLSurface.wlr(); surfacePos = CONSTRAINTWINDOW->m_vRealPosition.vec(); } else { g_pCompositor->vectorWindowToSurface(mouseCoords, CONSTRAINTWINDOW, surfaceCoords); @@ -198,7 +198,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); surfacePos = Vector2D(-1337, -1337); } else { - foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); + foundSurface = pFoundWindow->m_pWLSurface.wlr(); surfacePos = pFoundWindow->m_vRealPosition.vec(); } } @@ -232,7 +232,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (!pFoundWindow->m_bIsX11) { foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); } else { - foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); + foundSurface = pFoundWindow->m_pWLSurface.wlr(); surfacePos = pFoundWindow->m_vRealPosition.vec(); } } @@ -1127,7 +1127,7 @@ void CInputManager::unconstrainMouse() { const auto CONSTRAINTWINDOW = g_pCompositor->getConstraintWindow(g_pCompositor->m_sSeat.mouse); if (CONSTRAINTWINDOW) { - g_pXWaylandManager->activateSurface(g_pXWaylandManager->getWindowSurface(CONSTRAINTWINDOW), false); + g_pXWaylandManager->activateSurface(CONSTRAINTWINDOW->m_pWLSurface.wlr(), false); } wlr_pointer_constraint_v1_send_deactivated(g_pCompositor->m_sSeat.mouse->currentConstraint); -- cgit v1.2.3