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

@@ -467,7 +467,7 @@ void CKeybindManager::changeworkspace(std::string args) {
}
// remove constraints
g_pCompositor->m_sSeat.mouse->constraintActive = false;
g_pInputManager->unconstrainMouse();
// if it exists, we warp to it
if (g_pCompositor->getWorkspaceByID(workspaceToChangeTo)) {
@@ -745,7 +745,7 @@ void CKeybindManager::moveFocusTo(std::string args) {
return;
// remove constraints
g_pCompositor->m_sSeat.mouse->constraintActive = false;
g_pInputManager->unconstrainMouse();
auto switchToWindow = [&](CWindow* PWINDOWTOCHANGETO) {