diff options
author | Vaxry <[email protected]> | 2024-04-24 16:18:38 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-04-24 16:18:38 +0100 |
commit | 8aecd4f253a102a2afa4edd3e502106eb3626d86 (patch) | |
tree | 8b35d183fde8377bf3234699e841a02be95eb0d9 | |
parent | 608eff600d31879519aa64b795b45709ebfac267 (diff) | |
download | Hyprland-8aecd4f253a102a2afa4edd3e502106eb3626d86.tar.gz Hyprland-8aecd4f253a102a2afa4edd3e502106eb3626d86.zip |
cursormgr: fix misscaled cursors on fractional
-rw-r--r-- | src/managers/CursorManager.cpp | 6 |
1 files 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()) |