diff options
| author | Bruno Krügel <xnep1@hotmail.com> | 2025-04-18 20:16:30 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-19 01:16:30 +0200 |
| commit | f48ee7a3d17810c9a0bf229fc3131e15b09ef179 (patch) | |
| tree | eb9d6d8715959559c72b18ab8be617fc2bfaf3d1 /src/protocols/PointerConstraints.cpp | |
| parent | 51afc2c2910d6f7c1f2dee9c90f54729d3c3d940 (diff) | |
protocols: ensure PointerConstraints activation occurs only after attched to InputManager (#10096)
Diffstat (limited to 'src/protocols/PointerConstraints.cpp')
| -rw-r--r-- | src/protocols/PointerConstraints.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp index 30ab0a55..0a93d332 100644 --- a/src/protocols/PointerConstraints.cpp +++ b/src/protocols/PointerConstraints.cpp @@ -93,9 +93,6 @@ void CPointerConstraint::sharedConstructions() { } cursorPosOnActivate = g_pInputManager->getMouseCoordsInternal(); - - if (g_pCompositor->m_pLastFocus == pHLSurface->resource()) - activate(); } bool CPointerConstraint::good() { @@ -244,6 +241,9 @@ void CPointerConstraintsProtocol::onNewConstraint(SP<CPointerConstraint> constra OWNER->appendConstraint(constraint); g_pInputManager->m_vConstraints.emplace_back(constraint); + + if (g_pCompositor->m_pLastFocus == OWNER->resource()) + constraint->activate(); } void CPointerConstraintsProtocol::onLockPointer(CZwpPointerConstraintsV1* pMgr, uint32_t id, wl_resource* surface, wl_resource* pointer, wl_resource* region, |
