diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-25 22:19:51 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-25 22:19:51 +0000 |
| commit | edd0a141de56cb71dc46ffdaf70fe0ccd950b136 (patch) | |
| tree | 5a0903314c1564f4cf782e27eb803f87b29bc2aa /src | |
| parent | cf566b59ce980790bc60dac8adf4df9ec8bcf9f9 (diff) | |
don't snap on empty hint
Diffstat (limited to 'src')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index d5c5acb1..e221651a 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -112,7 +112,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { Vector2D hint = {PCONSTRAINT->positionHint.x, PCONSTRAINT->positionHint.y}; - wlr_cursor_warp_closest(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, CONSTRAINTPOS.x + hint.x, CONSTRAINTPOS.y + hint.y); + if (hint != Vector2D{-1, -1}) + wlr_cursor_warp_closest(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, CONSTRAINTPOS.x + hint.x, CONSTRAINTPOS.y + hint.y); return; // don't process anything else, the cursor is locked. The surface should not receive any further events. // these are usually FPS games. They will use the relative motion. |
