diff options
| author | Giacomo Zama <32515303+giacomozama@users.noreply.github.com> | 2025-11-16 18:43:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-16 17:43:55 +0000 |
| commit | b04e8e00b0909445c733272ca80472a9ade79a38 (patch) | |
| tree | 3d3a62e6b4f8b6e5a0967cf7dbf6d8fdc23ed95f /src/managers/input/InputManager.cpp | |
| parent | 5b373ea9f52db098cc9e7eb7c742a187ee21a487 (diff) | |
cursor: fix m_cursorSurfaceInfo not being updated while a cursor override is set (#12327)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 12 |
1 files 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<uintptr_t>(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); } |
