From 0220e4c1eac1f797e3c3406e0e92d4311ce8090c Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 13 Aug 2023 17:46:16 +0200 Subject: [PATCH] input: notify idle about activity on mouse move regardless of focus --- src/managers/input/InputManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index f4382838..bee83388 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -85,6 +85,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (MOUSECOORDSFLOORED == m_vLastCursorPosFloored && !refocus) return; + if (time) + g_pCompositor->notifyIdleActivity(); + EMIT_HOOK_EVENT("mouseMove", MOUSECOORDSFLOORED); m_vLastCursorPosFloored = MOUSECOORDSFLOORED; @@ -319,9 +322,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { m_bEmptyFocusCursorSet = false; - if (time) - g_pCompositor->notifyIdleActivity(); - Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos; if (pFoundWindow && !pFoundWindow->m_bIsX11 && surfacePos != Vector2D(-1337, -1337)) {