config: don't enable vrr 2 for maximized workspaces

fixes #3162
This commit is contained in:
vaxerski 2023-09-04 18:24:18 +02:00
parent d9937fcdba
commit 4eecb8bffc

View file

@ -2081,10 +2081,9 @@ 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;
} else if (USEVRR == 1) {
@ -2096,10 +2095,9 @@ 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;
} else if (USEVRR == 2) {
@ -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,17 +2119,16 @@ 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);
}
}
}
};
if (pMonitor) {