diff options
author | dusanx <[email protected]> | 2023-12-18 16:06:06 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-18 16:06:06 +0000 |
commit | 0c74df4f9efa0efe6ff1e73c74999acc217f68bb (patch) | |
tree | faea7410e6f4f1b67b047aa6fafdae7fdf63d744 /src/managers/input/InputManager.cpp | |
parent | 460a326c9020f1e9a6bf4157b5a8f1d560b5b536 (diff) | |
download | Hyprland-0c74df4f9efa0efe6ff1e73c74999acc217f68bb.tar.gz Hyprland-0c74df4f9efa0efe6ff1e73c74999acc217f68bb.zip |
renderer: cursor hiding logic improvements (#4184)
Co-authored-by: Dusan Popovic <[email protected]>
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r-- | src/managers/input/InputManager.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c6904a82..db06de55 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -324,13 +324,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { unsetCursorImage(); } - if (g_pHyprRenderer->m_bHasARenderedCursor) { - // TODO: maybe wrap? - if (m_ecbClickBehavior == CLICKMODE_KILL) - setCursorImageOverride("crosshair"); - else - setCursorImageOverride("left_ptr"); - } + // TODO: maybe wrap? + if (m_ecbClickBehavior == CLICKMODE_KILL) + setCursorImageOverride("crosshair"); + else + setCursorImageOverride("left_ptr"); m_bEmptyFocusCursorSet = true; } @@ -490,7 +488,7 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even else g_pHyprRenderer->m_bWindowRequestedCursorHide = false; - if (!cursorImageUnlocked() || !g_pHyprRenderer->m_bHasARenderedCursor) + if (!cursorImageUnlocked()) return; if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client) { @@ -513,7 +511,7 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even } void CInputManager::processMouseRequest(wlr_cursor_shape_manager_v1_request_set_shape_event* e) { - if (!g_pHyprRenderer->m_bHasARenderedCursor || !cursorImageUnlocked()) + if (!cursorImageUnlocked()) return; if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client) { @@ -555,9 +553,6 @@ void CInputManager::setCursorImageOverride(const std::string& name) { } bool CInputManager::cursorImageUnlocked() { - if (!g_pHyprRenderer->m_bHasARenderedCursor) - return false; - if (m_ecbClickBehavior == CLICKMODE_KILL) return false; |