Skip to content

Commit

Permalink
constraints: only warp cursor on deactivate if constraint is locked. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
s-viour committed Mar 9, 2024
1 parent b0f98a3 commit 335506d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/desktop/Constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 335506d

Please sign in to comment.