renderer: add dpms animations (#11452)

This commit is contained in:
Vaxry 2025-08-17 08:37:13 +01:00 committed by GitHub
parent 3d4dc19412
commit 251288ec59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 64 additions and 15 deletions

View file

@ -2670,21 +2670,7 @@ SDispatchResult CKeybindManager::dpms(std::string arg) {
if (isToggle)
enable = !m->m_dpmsStatus;
m->m_output->state->resetExplicitFences();
m->m_output->state->setEnabled(enable);
m->m_dpmsStatus = enable;
if (!m->m_state.commit()) {
Debug::log(ERR, "Couldn't commit output {}", m->m_name);
res.success = false;
res.error = "Couldn't commit output {}";
}
if (enable)
g_pHyprRenderer->damageMonitor(m);
m->m_events.dpmsChanged.emit();
m->setDPMS(enable);
}
g_pCompositor->m_dpmsStateOn = enable;