diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-01 18:50:16 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-01 18:50:16 +0200 |
| commit | 1edd66618f45a2e042260e4af81933d532e82394 (patch) | |
| tree | 081440260fab7a807616af33682af2a4a3b982d5 /src/managers/KeybindManager.cpp | |
| parent | 338865e4334b5c60ba2657ff6ab7a069b8d7e19d (diff) | |
added general:no_cursor_warps
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 155cc38b..895e7600 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -510,7 +510,7 @@ void CKeybindManager::changeworkspace(std::string args) { // If the monitor is not the one our cursor's at, warp to it. if (PMONITOR != g_pCompositor->getMonitorFromCursor()) { Vector2D middle = PMONITOR->vecPosition + PMONITOR->vecSize / 2.f; - wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, middle.x, middle.y); + g_pCompositor->warpCursorTo(middle); } // set active and deactivate all other in wlr @@ -744,7 +744,7 @@ void CKeybindManager::moveFocusTo(std::string args) { auto switchToWindow = [&](CWindow* PWINDOWTOCHANGETO) { g_pCompositor->focusWindow(PWINDOWTOCHANGETO); Vector2D middle = PWINDOWTOCHANGETO->m_vRealPosition.goalv() + PWINDOWTOCHANGETO->m_vRealSize.goalv() / 2.f; - wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, middle.x, middle.y); + g_pCompositor->warpCursorTo(middle); }; if (!g_pCompositor->windowValidMapped(PLASTWINDOW)) { @@ -1245,7 +1245,7 @@ void CKeybindManager::circleNext(std::string arg) { const auto MIDPOINT = g_pCompositor->m_pLastWindow->m_vRealPosition.goalv() + g_pCompositor->m_pLastWindow->m_vRealSize.goalv() / 2.f; - wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, MIDPOINT.x, MIDPOINT.y); + g_pCompositor->warpCursorTo(MIDPOINT); } void CKeybindManager::focusWindow(std::string regexp) { @@ -1262,7 +1262,7 @@ void CKeybindManager::focusWindow(std::string regexp) { const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f; - wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, MIDPOINT.x, MIDPOINT.y); + g_pCompositor->warpCursorTo(MIDPOINT); } void CKeybindManager::setSubmap(std::string submap) { |
