mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 09:46:00 +01:00
monitors: fix vrr breaking monitor disconnect (#8314)
This commit is contained in:
parent
93b4478e70
commit
c4d214c42d
2 changed files with 6 additions and 3 deletions
|
@ -1608,9 +1608,6 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
|
||||||
m->vrrActive = true;
|
m->vrrActive = true;
|
||||||
return;
|
return;
|
||||||
} else if (USEVRR == 2) {
|
} else if (USEVRR == 2) {
|
||||||
/* fullscreen */
|
|
||||||
m->vrrActive = true;
|
|
||||||
|
|
||||||
const auto PWORKSPACE = m->activeWorkspace;
|
const auto PWORKSPACE = m->activeWorkspace;
|
||||||
|
|
||||||
if (!PWORKSPACE)
|
if (!PWORKSPACE)
|
||||||
|
@ -1619,6 +1616,9 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
|
||||||
const auto WORKSPACEFULL = PWORKSPACE->m_bHasFullscreenWindow && (PWORKSPACE->m_efFullscreenMode & FSMODE_FULLSCREEN);
|
const auto WORKSPACEFULL = PWORKSPACE->m_bHasFullscreenWindow && (PWORKSPACE->m_efFullscreenMode & FSMODE_FULLSCREEN);
|
||||||
|
|
||||||
if (WORKSPACEFULL) {
|
if (WORKSPACEFULL) {
|
||||||
|
/* fullscreen */
|
||||||
|
m->vrrActive = true;
|
||||||
|
|
||||||
m->output->state->resetExplicitFences();
|
m->output->state->resetExplicitFences();
|
||||||
m->output->state->setAdaptiveSync(true);
|
m->output->state->setAdaptiveSync(true);
|
||||||
|
|
||||||
|
@ -1631,6 +1631,8 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
|
||||||
Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> true", m->output->name);
|
Debug::log(ERR, "Couldn't commit output {} in ensureVRR -> true", m->output->name);
|
||||||
|
|
||||||
} else if (!WORKSPACEFULL) {
|
} else if (!WORKSPACEFULL) {
|
||||||
|
m->vrrActive = false;
|
||||||
|
|
||||||
m->output->state->resetExplicitFences();
|
m->output->state->resetExplicitFences();
|
||||||
m->output->state->setAdaptiveSync(false);
|
m->output->state->setAdaptiveSync(false);
|
||||||
|
|
||||||
|
|
|
@ -334,6 +334,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
||||||
activeWorkspace.reset();
|
activeWorkspace.reset();
|
||||||
|
|
||||||
output->state->resetExplicitFences();
|
output->state->resetExplicitFences();
|
||||||
|
output->state->setAdaptiveSync(false);
|
||||||
output->state->setEnabled(false);
|
output->state->setEnabled(false);
|
||||||
|
|
||||||
if (!state.commit())
|
if (!state.commit())
|
||||||
|
|
Loading…
Reference in a new issue