diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ca659d6a..1df5acb3 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -470,7 +470,7 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even else g_pHyprRenderer->m_bWindowRequestedCursorHide = false; - if (!cursorImageUnlocked()) + if (!cursorImageUnlocked() || !g_pHyprRenderer->shouldRenderCursor()) return; // cursorSurfaceInfo.pSurface = e->surface; @@ -487,18 +487,11 @@ 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->shouldRenderCursor()) + if (!g_pHyprRenderer->shouldRenderCursor() || !cursorImageUnlocked()) return; - if (!g_pCompositor->m_pLastFocus) - return; - - if (wl_resource_get_client(g_pCompositor->m_pLastFocus->resource) != e->seat_client->client) { - Debug::log(ERR, "Disallowing cursor shape request from unfocused"); - return; - } - - wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, wlr_cursor_shape_v1_name(e->shape)); + if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client) + wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, wlr_cursor_shape_v1_name(e->shape)); } bool CInputManager::cursorImageUnlocked() {