mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 04:09:49 +01:00
parent
d9937fcdba
commit
4eecb8bffc
1 changed files with 9 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue