layerrules: add abovelock to render above lockscreen (#9793)
This commit is contained in:
parent
41f5f67f6c
commit
4cf62c114e
9 changed files with 71 additions and 24 deletions
|
|
@ -690,10 +690,14 @@ void CHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, const T
|
|||
g_pHyprOpenGL->m_RenderData.currentWindow.reset();
|
||||
}
|
||||
|
||||
void CHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, const Time::steady_tp& time, bool popups) {
|
||||
void CHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, const Time::steady_tp& time, bool popups, bool lockscreen) {
|
||||
if (!pLayer)
|
||||
return;
|
||||
|
||||
// skip rendering based on abovelock rule and make sure to not render abovelock layers twice
|
||||
if ((pLayer->m_aboveLockscreen && !lockscreen && g_pSessionLockManager->isSessionLocked()) || (lockscreen && !pLayer->m_aboveLockscreen))
|
||||
return;
|
||||
|
||||
static auto PDIMAROUND = CConfigValue<Hyprlang::FLOAT>("decoration:dim_around");
|
||||
|
||||
if (*PDIMAROUND && pLayer->m_dimAround && !m_bRenderingSnapshot && !popups) {
|
||||
|
|
@ -998,6 +1002,19 @@ void CHyprRenderer::renderLockscreen(PHLMONITOR pMonitor, const Time::steady_tp&
|
|||
renderSessionLockMissing(pMonitor);
|
||||
} else {
|
||||
renderSessionLockSurface(PSLS, pMonitor, now);
|
||||
|
||||
// render layers and then their popups for abovelock rule
|
||||
for (auto const& lsl : pMonitor->m_aLayerSurfaceLayers) {
|
||||
for (auto const& ls : lsl) {
|
||||
renderLayer(ls.lock(), pMonitor, now, false, true);
|
||||
}
|
||||
}
|
||||
for (auto const& lsl : pMonitor->m_aLayerSurfaceLayers) {
|
||||
for (auto const& ls : lsl) {
|
||||
renderLayer(ls.lock(), pMonitor, now, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
g_pSessionLockManager->onLockscreenRenderedOnMonitor(pMonitor->ID);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue