summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-01-27 19:11:03 +0000
committerVaxry <vaxry@vaxry.net>2024-01-27 19:11:14 +0000
commitbc7e488a4c7a4bfdd7bce66265fe8aea516fd2ed (patch)
tree496aa74e4f6a1f655e28adc145cd5af612d8211d /src/config/ConfigManager.cpp
parent8b1069b33051dbc3a133444dc6ce7385cdc51377 (diff)
monitor: clear output state after usage
fixes massive lag
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp8
1 files changed, 8 insertions, 0 deletions
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();
}
}
};