diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-18 14:57:08 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-18 14:57:08 +0200 |
| commit | 5454cf8e89b99032d2e72f7993fa900783a35e74 (patch) | |
| tree | be6872168dc62100ef35c13e97bde877cf6374b8 /src/managers/KeybindManager.cpp | |
| parent | 8cf1e6d60d2ae43fc819d336b3126b2cc86c96eb (diff) | |
Fixed mouse constraints, should be correct now
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 54258529..acc027f3 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -175,6 +175,9 @@ void CKeybindManager::changeworkspace(std::string args) { return; } + // remove constraints + g_pCompositor->m_sSeat.mouse->constraintActive = false; + // if it exists, we warp to it if (g_pCompositor->getWorkspaceByID(workspaceToChangeTo)) { const auto PMONITOR = g_pCompositor->getMonitorFromID(g_pCompositor->getWorkspaceByID(workspaceToChangeTo)->m_iMonitorID); @@ -400,6 +403,9 @@ void CKeybindManager::moveFocusTo(std::string args) { const auto PLASTWINDOW = g_pCompositor->m_pLastWindow; + // remove constraints + g_pCompositor->m_sSeat.mouse->constraintActive = false; + auto switchToWindow = [&](CWindow* PWINDOWTOCHANGETO) { g_pCompositor->focusWindow(PWINDOWTOCHANGETO); Vector2D middle = PWINDOWTOCHANGETO->m_vRealPosition.goalv() + PWINDOWTOCHANGETO->m_vRealSize.goalv() / 2.f; |
