From b04e8e00b0909445c733272ca80472a9ade79a38 Mon Sep 17 00:00:00 2001 From: Giacomo Zama <32515303+giacomozama@users.noreply.github.com> Date: Sun, 16 Nov 2025 18:43:55 +0100 Subject: [PATCH] cursor: fix m_cursorSurfaceInfo not being updated while a cursor override is set (#12327) --- src/managers/input/InputManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 1f1b0d0d..f44f2101 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -50,9 +50,6 @@ CInputManager::CInputManager() { m_listeners.setCursorShape = PROTO::cursorShape->m_events.setShape.listen([this](const CCursorShapeProtocol::SSetShapeEvent& event) { - if (!cursorImageUnlocked()) - return; - if (!g_pSeatManager->m_state.pointerFocusResource) return; @@ -66,6 +63,9 @@ CInputManager::CInputManager() { m_cursorSurfaceInfo.name = event.shapeName; m_cursorSurfaceInfo.hidden = false; + if (!cursorImageUnlocked()) + return; + g_pHyprRenderer->setCursorFromName(m_cursorSurfaceInfo.name); }); @@ -653,9 +653,6 @@ void CInputManager::onMouseButton(IPointer::SButtonEvent e) { } void CInputManager::processMouseRequest(const CSeatManager::SSetCursorEvent& event) { - if (!cursorImageUnlocked()) - return; - Debug::log(LOG, "cursorImage request: surface {:x}", rc(event.surf.get())); if (event.surf != m_cursorSurfaceInfo.wlSurface->resource()) { @@ -675,6 +672,9 @@ void CInputManager::processMouseRequest(const CSeatManager::SSetCursorEvent& eve m_cursorSurfaceInfo.name = ""; + if (!cursorImageUnlocked()) + return; + g_pHyprRenderer->setCursorSurface(m_cursorSurfaceInfo.wlSurface, event.hotspot.x, event.hotspot.y); }