From bc7e488a4c7a4bfdd7bce66265fe8aea516fd2ed Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 27 Jan 2024 19:11:03 +0000 Subject: monitor: clear output state after usage fixes massive lag --- src/config/ConfigManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index e9d2e512..0e98b977 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2321,6 +2321,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) { if (!wlr_output_commit_state(m->output, &m->outputState)) Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> false", m->output->name); + + pMonitor->clearState(); } m->vrrActive = false; return; @@ -2335,6 +2337,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) { if (!wlr_output_commit_state(m->output, &m->outputState)) Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> true", m->output->name); + + pMonitor->clearState(); } m->vrrActive = true; return; @@ -2360,11 +2364,15 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) { if (!wlr_output_commit_state(m->output, &m->outputState)) Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> true", m->output->name); + pMonitor->clearState(); + } else if (!WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) { wlr_output_state_set_adaptive_sync_enabled(&m->outputState, 0); if (!wlr_output_commit_state(m->output, &m->outputState)) Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> false", m->output->name); + + pMonitor->clearState(); } } }; -- cgit v1.2.3