diff options
| author | Pavel Belyavsky <work.belyavsky.p.a@gmail.com> | 2024-12-10 23:55:05 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 21:55:05 +0100 |
| commit | 4d05677e8d398b6fa144eae7a98ad4f2a54acb92 (patch) | |
| tree | 0f3e8e90dfc3dabcb40992609f17186f94258574 /src/desktop/Window.cpp | |
| parent | c16044a5c88ce9a42987b849068a66c11873575d (diff) | |
config: add 'force' option for 'cursor:warp_on_change_workspace' (#8681)
* config: add 'force' option for 'cursor:warp_on_change_workspace'
* manager: throw the expression into the function arguments
* config: fix description of `cursor:warp_on_change_workspace`
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 7dedaea0..e4651e61 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1529,15 +1529,15 @@ void CWindow::onX11Configure(CBox box) { g_pHyprRenderer->damageWindow(m_pSelf.lock()); } -void CWindow::warpCursor() { +void CWindow::warpCursor(bool force) { static auto PERSISTENTWARPS = CConfigValue<Hyprlang::INT>("cursor:persistent_warps"); const auto coords = m_vRelativeCursorCoordsOnLastWarp; m_vRelativeCursorCoordsOnLastWarp.x = -1; // reset m_vRelativeCursorCoordsOnLastWarp if (*PERSISTENTWARPS && coords.x > 0 && coords.y > 0 && coords < m_vSize) // don't warp cursor outside the window - g_pCompositor->warpCursorTo(m_vPosition + coords); + g_pCompositor->warpCursorTo(m_vPosition + coords, force); else - g_pCompositor->warpCursorTo(middle()); + g_pCompositor->warpCursorTo(middle(), force); } PHLWINDOW CWindow::getSwallower() { |
