From 8aecd4f253a102a2afa4edd3e502106eb3626d86 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 24 Apr 2024 16:18:38 +0100 Subject: [PATCH] cursormgr: fix misscaled cursors on fractional --- src/managers/CursorManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 68f020c2..51f012b4 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -210,13 +210,15 @@ void CCursorManager::updateTheme() { highestScale = m->scale; } - if (highestScale * m_iSize == m_sCurrentStyleInfo.size) + highestScale = std::ceil(highestScale); + + if (std::round(highestScale * m_iSize) == m_sCurrentStyleInfo.size) return; if (m_sCurrentStyleInfo.size && m_pHyprcursor->valid()) m_pHyprcursor->cursorSurfaceStyleDone(m_sCurrentStyleInfo); - m_sCurrentStyleInfo.size = m_iSize * highestScale; + m_sCurrentStyleInfo.size = std::round(m_iSize * highestScale); m_fCursorScale = highestScale; if (m_pHyprcursor->valid())