From 5b3e489108d8512fb5dfacf07b2aa3a71208e0f0 Mon Sep 17 00:00:00 2001 From: davc0n Date: Thu, 1 May 2025 23:57:11 +0200 Subject: inputs: refactor class member vars (#10230) --- src/protocols/PointerConstraints.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocols/PointerConstraints.cpp') diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp index ed24a5fe..2858ee95 100644 --- a/src/protocols/PointerConstraints.cpp +++ b/src/protocols/PointerConstraints.cpp @@ -69,7 +69,7 @@ CPointerConstraint::CPointerConstraint(SP resource_, SPm_vConstraints, [this](const auto& c) { + std::erase_if(g_pInputManager->m_constraints, [this](const auto& c) { const auto SHP = c.lock(); return !SHP || SHP.get() == this; }); @@ -85,7 +85,7 @@ void CPointerConstraint::sharedConstructions() { if (active) deactivate(); - std::erase_if(g_pInputManager->m_vConstraints, [this](const auto& c) { + std::erase_if(g_pInputManager->m_constraints, [this](const auto& c) { const auto SHP = c.lock(); return !SHP || SHP.get() == this; }); @@ -113,7 +113,7 @@ void CPointerConstraint::deactivate() { if (lifetime == ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT) { dead = true; // remove from inputmgr - std::erase_if(g_pInputManager->m_vConstraints, [this](const auto& c) { + std::erase_if(g_pInputManager->m_constraints, [this](const auto& c) { const auto SHP = c.lock(); return !SHP || SHP.get() == this; }); @@ -240,7 +240,7 @@ void CPointerConstraintsProtocol::onNewConstraint(SP constra OWNER->appendConstraint(constraint); - g_pInputManager->m_vConstraints.emplace_back(constraint); + g_pInputManager->m_constraints.emplace_back(constraint); if (g_pCompositor->m_lastFocus == OWNER->resource()) constraint->activate(); -- cgit v1.2.3