From f6038837bc12a5f22808ceea0641dd9fe17d8094 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 20 Mar 2024 01:30:19 +0000 Subject: [PATCH] constraint: do not disable constraints in destroy fixes #5170 --- src/desktop/Constraint.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/desktop/Constraint.cpp b/src/desktop/Constraint.cpp index 2109ef1c..e7858321 100644 --- a/src/desktop/Constraint.cpp +++ b/src/desktop/Constraint.cpp @@ -33,8 +33,11 @@ void CConstraint::initSignals() { } void CConstraint::onDestroy() { - if (active()) - deactivate(); + hyprListener_setConstraintRegion.removeCallback(); + hyprListener_destroyConstraint.removeCallback(); + + if (active() && isLocked()) + g_pCompositor->warpCursorTo(logicPositionHint(), true); // this is us m_pOwner->m_pConstraint.reset();