constraints: only warp cursor on deactivate if constraint is locked. (#5056)

This commit is contained in:
Matt Wyatt
2024-03-09 17:19:48 -06:00
committed by GitHub
parent b0f98a3d3e
commit 335506d555

View File

@@ -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;