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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;