diff options
author | Matt Wyatt <[email protected]> | 2024-03-09 17:19:48 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-09 23:19:48 +0000 |
commit | 335506d5557b91a0baf974750c353443841e691b (patch) | |
tree | 5af3ec320d53ef66cf623e0cc31177e33d46c4c8 | |
parent | b0f98a3d3e9e5f5f7f89fa4e855dbeb860e7a0c4 (diff) | |
download | Hyprland-335506d5557b91a0baf974750c353443841e691b.tar.gz Hyprland-335506d5557b91a0baf974750c353443841e691b.zip |
constraints: only warp cursor on deactivate if constraint is locked. (#5056)
-rw-r--r-- | src/desktop/Constraint.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |