From 0a1f95b6571641499ba92bc109759c659f256515 Mon Sep 17 00:00:00 2001 From: Gwilherm Folliot Date: Tue, 17 Dec 2024 20:41:27 +0100 Subject: [PATCH] input-capture: don't send motion when the input is locked (like inside a 3d game) --- src/managers/PointerManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 332fe760..52631509 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -702,7 +702,9 @@ void CPointerManager::move(const Vector2D& deltaLogical) { const auto oldPos = pointerPos; auto newPos = oldPos + Vector2D{std::isnan(deltaLogical.x) ? 0.0 : deltaLogical.x, std::isnan(deltaLogical.y) ? 0.0 : deltaLogical.y}; - PROTO::inputCapture->sendMotion(newPos, deltaLogical); + + if (!g_pInputManager->isLocked()) + PROTO::inputCapture->sendMotion(newPos, deltaLogical); if (PROTO::inputCapture->isCaptured()) return;