input: notify idle about activity on mouse move regardless of focus

This commit is contained in:
Vaxry 2023-08-13 17:46:16 +02:00
parent 4b568ae5f6
commit 0220e4c1ea

View file

@ -85,6 +85,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
if (MOUSECOORDSFLOORED == m_vLastCursorPosFloored && !refocus) if (MOUSECOORDSFLOORED == m_vLastCursorPosFloored && !refocus)
return; return;
if (time)
g_pCompositor->notifyIdleActivity();
EMIT_HOOK_EVENT("mouseMove", MOUSECOORDSFLOORED); EMIT_HOOK_EVENT("mouseMove", MOUSECOORDSFLOORED);
m_vLastCursorPosFloored = MOUSECOORDSFLOORED; m_vLastCursorPosFloored = MOUSECOORDSFLOORED;
@ -319,9 +322,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
m_bEmptyFocusCursorSet = false; m_bEmptyFocusCursorSet = false;
if (time)
g_pCompositor->notifyIdleActivity();
Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos; Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos;
if (pFoundWindow && !pFoundWindow->m_bIsX11 && surfacePos != Vector2D(-1337, -1337)) { if (pFoundWindow && !pFoundWindow->m_bIsX11 && surfacePos != Vector2D(-1337, -1337)) {