clean up unconstraining logic

This commit is contained in:
vaxerski
2022-08-09 20:36:21 +02:00
parent 9255a4d2ff
commit 8e5985d70e
4 changed files with 31 additions and 7 deletions

View File

@@ -79,7 +79,7 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) {
m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset = Vector2D(m_sActiveSwipe.pMonitor->vecSize.x, 0);
m_sActiveSwipe.pWorkspaceBegin->m_fAlpha.setValueAndWarp(255.f);
g_pCompositor->m_sSeat.mouse->currentConstraint = nullptr;
g_pInputManager->unconstrainMouse();
Debug::log(LOG, "Ended swipe to the left");
} else {
@@ -95,7 +95,7 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) {
m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset = Vector2D(-m_sActiveSwipe.pMonitor->vecSize.x, 0);
m_sActiveSwipe.pWorkspaceBegin->m_fAlpha.setValueAndWarp(255.f);
g_pCompositor->m_sSeat.mouse->currentConstraint = nullptr;
g_pInputManager->unconstrainMouse();
Debug::log(LOG, "Ended swipe to the right");
}