summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 48b4dee5..5286dce5 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -2081,9 +2081,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
if (m->vrrActive) {
wlr_output_enable_adaptive_sync(m->output, 0);
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
- }
}
m->vrrActive = false;
return;
@@ -2096,9 +2095,8 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
wlr_output_enable_adaptive_sync(m->output, 0);
}
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
- }
}
m->vrrActive = true;
return;
@@ -2111,7 +2109,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
if (!PWORKSPACE)
return; // ???
- if (PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
+ const auto WORKSPACEFULL = PWORKSPACE->m_bHasFullscreenWindow && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL;
+
+ if (WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) {
wlr_output_enable_adaptive_sync(m->output, 1);
if (!wlr_output_test(m->output)) {
@@ -2119,15 +2119,14 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
wlr_output_enable_adaptive_sync(m->output, 0);
}
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> true", m->output->name);
- }
- } else if (!PWORKSPACE->m_bHasFullscreenWindow && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
+
+ } else if (!WORKSPACEFULL && m->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) {
wlr_output_enable_adaptive_sync(m->output, 0);
- if (!wlr_output_commit(m->output)) {
+ if (!wlr_output_commit(m->output))
Debug::log(ERR, "Couldn't commit output %s in ensureVRR -> false", m->output->name);
- }
}
}
};