cursor: fix m_cursorSurfaceInfo not being updated while a cursor override is set (#12327)
This commit is contained in:
parent
5b373ea9f5
commit
b04e8e00b0
1 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue