From b1426cad28f250a2269012da904901e0edcef114 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 2 Apr 2023 13:42:57 +0100 Subject: [PATCH] input: fix minor issue with holding focus --- src/Compositor.cpp | 2 +- src/managers/input/InputManager.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 0f67b9b1..4f331320 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2164,7 +2164,7 @@ SLayerSurface* CCompositor::getLayerSurfaceFromSurface(wlr_surface* pSurface) { return; } }; - + if (!ls->layerSurface || !ls->mapped) continue; diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index db9ff108..bf9286a8 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -160,9 +160,10 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } } else if (g_pCompositor->m_pLastWindow) { foundSurface = g_pCompositor->m_pLastFocus; + pFoundWindow = g_pCompositor->m_pLastWindow; if (!g_pCompositor->m_pLastWindow->m_bIsX11) - g_pCompositor->vectorWindowToSurface(mouseCoords, g_pCompositor->m_pLastWindow, surfaceCoords); + foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, g_pCompositor->m_pLastWindow, surfaceCoords); else surfacePos = g_pCompositor->m_pLastWindow->m_vRealPosition.vec();