mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 00:05:59 +01:00
cursormgr: fix misscaled cursors on fractional
This commit is contained in:
parent
608eff600d
commit
8aecd4f253
1 changed files with 4 additions and 2 deletions
|
@ -210,13 +210,15 @@ void CCursorManager::updateTheme() {
|
||||||
highestScale = m->scale;
|
highestScale = m->scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highestScale * m_iSize == m_sCurrentStyleInfo.size)
|
highestScale = std::ceil(highestScale);
|
||||||
|
|
||||||
|
if (std::round(highestScale * m_iSize) == m_sCurrentStyleInfo.size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_sCurrentStyleInfo.size && m_pHyprcursor->valid())
|
if (m_sCurrentStyleInfo.size && m_pHyprcursor->valid())
|
||||||
m_pHyprcursor->cursorSurfaceStyleDone(m_sCurrentStyleInfo);
|
m_pHyprcursor->cursorSurfaceStyleDone(m_sCurrentStyleInfo);
|
||||||
|
|
||||||
m_sCurrentStyleInfo.size = m_iSize * highestScale;
|
m_sCurrentStyleInfo.size = std::round(m_iSize * highestScale);
|
||||||
m_fCursorScale = highestScale;
|
m_fCursorScale = highestScale;
|
||||||
|
|
||||||
if (m_pHyprcursor->valid())
|
if (m_pHyprcursor->valid())
|
||||||
|
|
Loading…
Reference in a new issue