diff options
| author | Skidam <67871298+Skidamek@users.noreply.github.com> | 2026-02-18 15:48:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-18 14:48:56 +0000 |
| commit | 184af52f24c3267a4210239aba45a998404bb073 (patch) | |
| tree | 35ffa7a2ccd2e86e60a831e1ecbac60a09b374af /src/config/ConfigManager.cpp | |
| parent | 1af260ecbeb850e07e12f9ea70fde9f581b66fa4 (diff) | |
config: support no_vrr rule on vrr 1 (#13250)
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 046a2667..f9fd107d 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1791,24 +1791,41 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) { } m->m_vrrActive = false; return; - } else if (USEVRR == 1) { - if (!m->m_vrrActive) { - m->m_output->state->resetExplicitFences(); - m->m_output->state->setAdaptiveSync(true); + } - if (!m->m_state.test()) { - Log::logger->log(Log::DEBUG, "Pending output {} does not accept VRR.", m->m_output->name); - m->m_output->state->setAdaptiveSync(false); + const auto PWORKSPACE = m->m_activeWorkspace; + + if (USEVRR == 1) { + bool wantVRR = true; + if (PWORKSPACE && PWORKSPACE->m_hasFullscreenWindow && (PWORKSPACE->m_fullscreenMode & FSMODE_FULLSCREEN)) + wantVRR = !PWORKSPACE->getFullscreenWindow()->m_ruleApplicator->noVRR().valueOrDefault(); + + if (wantVRR) { + if (!m->m_vrrActive) { + m->m_output->state->resetExplicitFences(); + m->m_output->state->setAdaptiveSync(true); + + if (!m->m_state.test()) { + Log::logger->log(Log::DEBUG, "Pending output {} does not accept VRR.", m->m_output->name); + m->m_output->state->setAdaptiveSync(false); + } + + if (!m->m_state.commit()) + Log::logger->log(Log::ERR, "Couldn't commit output {} in ensureVRR -> true", m->m_output->name); } + m->m_vrrActive = true; + } else { + if (m->m_vrrActive) { + m->m_output->state->resetExplicitFences(); + m->m_output->state->setAdaptiveSync(false); - if (!m->m_state.commit()) - Log::logger->log(Log::ERR, "Couldn't commit output {} in ensureVRR -> true", m->m_output->name); + if (!m->m_state.commit()) + Log::logger->log(Log::ERR, "Couldn't commit output {} in ensureVRR -> false", m->m_output->name); + } + m->m_vrrActive = false; } - m->m_vrrActive = true; return; } else if (USEVRR == 2 || USEVRR == 3) { - const auto PWORKSPACE = m->m_activeWorkspace; - if (!PWORKSPACE) return; // ??? |
