mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-13 07:10:35 +01:00
protocols: ensure PointerConstraints activation occurs only after attched to InputManager (#10096)
This commit is contained in:
parent
51afc2c291
commit
f48ee7a3d1
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue