From 335506d5557b91a0baf974750c353443841e691b Mon Sep 17 00:00:00 2001 From: Matt Wyatt Date: Sat, 9 Mar 2024 17:19:48 -0600 Subject: [PATCH] constraints: only warp cursor on deactivate if constraint is locked. (#5056) --- src/desktop/Constraint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/desktop/Constraint.cpp b/src/desktop/Constraint.cpp index ea89037f..662f0990 100644 --- a/src/desktop/Constraint.cpp +++ b/src/desktop/Constraint.cpp @@ -94,7 +94,9 @@ void CConstraint::deactivate() { wlr_pointer_constraint_v1_send_deactivated(m_pConstraint); m_bActive = false; - g_pCompositor->warpCursorTo(logicPositionHint(), true); + + if (isLocked()) + g_pCompositor->warpCursorTo(logicPositionHint(), true); if (m_pConstraint->lifetime == ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT) m_bDead = true;