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

@ -1394,6 +1394,14 @@ void CHyprRenderer::renderMonitor(PHLMONITOR pMonitor, bool commit) {
g_pPointerManager->renderSoftwareCursorsFor(pMonitor->m_self.lock(), NOW, g_pHyprOpenGL->m_renderData.damage);
}
if (pMonitor->m_dpmsBlackOpacity->value() != 0.F) {
// render the DPMS black if we are animating
CRectPassElement::SRectData data;
data.box = {0, 0, pMonitor->m_transformedSize.x, pMonitor->m_transformedSize.y};
data.color = Colors::BLACK.modifyA(pMonitor->m_dpmsBlackOpacity->value());
m_renderPass.add(makeUnique<CRectPassElement>(data));
}
EMIT_HOOK_EVENT("render", RENDER_LAST_MOMENT);
endRender();