diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index f8aef6f5..859750b4 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -281,6 +281,8 @@ void CConfigManager::setDefaultVars() { configValues["xwayland:use_nearest_neighbor"].intValue = 1; configValues["xwayland:force_zero_scaling"].intValue = 0; + configValues["opengl:nvidia_anti_flicker"].intValue = 1; + configValues["autogenerated"].intValue = 0; } diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index abd42e46..60aa4e12 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -2419,7 +2419,8 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode } void CHyprRenderer::endRender() { - const auto PMONITOR = g_pHyprOpenGL->m_RenderData.pMonitor; + const auto PMONITOR = g_pHyprOpenGL->m_RenderData.pMonitor; + static auto* const PNVIDIAANTIFLICKER = &g_pConfigManager->getConfigValuePtr("opengl:nvidia_anti_flicker")->intValue; if (m_eRenderMode != RENDER_MODE_TO_BUFFER_READ_ONLY) g_pHyprOpenGL->end(); @@ -2432,7 +2433,7 @@ void CHyprRenderer::endRender() { if (m_eRenderMode == RENDER_MODE_FULL_FAKE) return; - if (isNvidia()) + if (isNvidia() && *PNVIDIAANTIFLICKER) glFinish(); else glFlush();