summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp12
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);
}