mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 18:25:59 +01:00
cursormgr: scale hotspot with buffer
This commit is contained in:
parent
30c5911718
commit
c34ad12183
1 changed files with 4 additions and 4 deletions
|
@ -128,8 +128,8 @@ void CCursorManager::setCursorFromName(const std::string& name) {
|
|||
Vector2D{m_sCurrentCursorShapeData.images[0].hotspotX, m_sCurrentCursorShapeData.images[0].hotspotY}));
|
||||
|
||||
if (g_pCompositor->m_sWLRCursor) {
|
||||
wlr_cursor_set_buffer(g_pCompositor->m_sWLRCursor, getCursorBuffer(), m_sCurrentCursorShapeData.images[0].hotspotX, m_sCurrentCursorShapeData.images[0].hotspotY,
|
||||
m_fCursorScale);
|
||||
wlr_cursor_set_buffer(g_pCompositor->m_sWLRCursor, getCursorBuffer(), m_sCurrentCursorShapeData.images[0].hotspotX / m_fCursorScale,
|
||||
m_sCurrentCursorShapeData.images[0].hotspotY / m_fCursorScale, m_fCursorScale);
|
||||
if (m_vCursorBuffers.size() > 1)
|
||||
wlr_buffer_drop(&m_vCursorBuffers.front()->wlrBuffer.base);
|
||||
}
|
||||
|
@ -160,8 +160,8 @@ void CCursorManager::tickAnimatedCursor() {
|
|||
Vector2D{m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotX, m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotY}));
|
||||
|
||||
if (g_pCompositor->m_sWLRCursor)
|
||||
wlr_cursor_set_buffer(g_pCompositor->m_sWLRCursor, getCursorBuffer(), m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotX,
|
||||
m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotY, m_fCursorScale);
|
||||
wlr_cursor_set_buffer(g_pCompositor->m_sWLRCursor, getCursorBuffer(), m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotX / m_fCursorScale,
|
||||
m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].hotspotY / m_fCursorScale, m_fCursorScale);
|
||||
|
||||
wl_event_source_timer_update(m_pAnimationTimer, m_sCurrentCursorShapeData.images[m_iCurrentAnimationFrame].delay);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue