mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-11 18:21:54 -07:00
Don't set surface cursors for overriden
This commit is contained in:
@@ -308,14 +308,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||||||
setCursorIconOnBorder(pFoundWindow);
|
setCursorIconOnBorder(pFoundWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we're on an input deco, reset cursor
|
// if we're on an input deco, reset cursor. Don't on overriden
|
||||||
if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
|
if (!m_bCursorImageOverriden) {
|
||||||
pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) {
|
if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
|
||||||
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
|
pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) {
|
||||||
cursorSurfaceInfo.bUsed = false;
|
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
|
||||||
} else if (!cursorSurfaceInfo.bUsed) {
|
cursorSurfaceInfo.bUsed = false;
|
||||||
cursorSurfaceInfo.bUsed = true;
|
} else if (!cursorSurfaceInfo.bUsed) {
|
||||||
wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
|
cursorSurfaceInfo.bUsed = true;
|
||||||
|
wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, cursorSurfaceInfo.pSurface, cursorSurfaceInfo.vHotspot.x, cursorSurfaceInfo.vHotspot.y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*PFOLLOWMOUSE != 1 && !refocus) {
|
if (*PFOLLOWMOUSE != 1 && !refocus) {
|
||||||
|
Reference in New Issue
Block a user