diff options
author | UjinT34 <[email protected]> | 2024-06-14 14:45:32 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-06-14 13:45:32 +0200 |
commit | a9d53a2252f7ec084e2487d18777e2df01c8c351 (patch) | |
tree | d9c57d21becd4fe0c5e4e9619612289b479e4b2a /src/render/Renderer.cpp | |
parent | b2590b58c51094424a9651d8df37dfab838b5bbb (diff) | |
download | Hyprland-a9d53a2252f7ec084e2487d18777e2df01c8c351.tar.gz Hyprland-a9d53a2252f7ec084e2487d18777e2df01c8c351.zip |
vrr: add option to fix mouse breaking vrr (#6483)
* option to fix mouse breaking vrr
* skip damage on mouse move
* remove this-> & cleanup
* add cursor:min_refresh_rate to avoid cursor freezing
* run clang-format
---------
Co-authored-by: UjinT34 <[email protected]>
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r-- | src/render/Renderer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 4fe35c7e..19b646a4 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1763,7 +1763,7 @@ void CHyprRenderer::damageMonitor(CMonitor* pMonitor) { Debug::log(LOG, "Damage: Monitor {}", pMonitor->szName); } -void CHyprRenderer::damageBox(CBox* pBox) { +void CHyprRenderer::damageBox(CBox* pBox, bool skipFrameSchedule) { if (g_pCompositor->m_bUnsafeState) return; @@ -1773,7 +1773,8 @@ void CHyprRenderer::damageBox(CBox* pBox) { CBox damageBox = {pBox->x - m->vecPosition.x, pBox->y - m->vecPosition.y, pBox->width, pBox->height}; damageBox.scale(m->scale); - m->addDamage(&damageBox); + if (!skipFrameSchedule) + m->addDamage(&damageBox); } static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage"); |