renderer: add lockdead_screen_delay (#8467)

This commit is contained in:
Alexandre Acebedo
2024-11-17 15:58:18 +00:00
committed by GitHub
parent af83c82513
commit 0ddbd1c3a4
5 changed files with 25 additions and 4 deletions

View File

@@ -1045,9 +1045,10 @@ void CHyprRenderer::renderLockscreen(PHLMONITOR pMonitor, timespec* now, const C
Vector2D translate = {geometry.x, geometry.y};
const auto PSLS = g_pSessionLockManager->getSessionLockSurfaceForMonitor(pMonitor->ID);
if (!PSLS)
renderSessionLockMissing(pMonitor);
else {
if (!PSLS) {
if (g_pSessionLockManager->shallConsiderLockMissing())
renderSessionLockMissing(pMonitor);
} else {
renderSessionLockSurface(PSLS, pMonitor, now);
g_pSessionLockManager->onLockscreenRenderedOnMonitor(pMonitor->ID);
}
@@ -2726,7 +2727,7 @@ bool CHyprRenderer::beginRender(PHLMONITOR pMonitor, CRegion& damage, eRenderMod
return true;
}
/* This is a constant expression, as we always use double-buffering in our swapchain
/* This is a constant expression, as we always use double-buffering in our swapchain
TODO: Rewrite the CDamageRing to take advantage of that maybe? It's made to support longer swapchains atm because we used to do wlroots */
static constexpr const int HL_BUFFER_AGE = 2;