mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 15:41:58 -07:00
layerrules: add abovelock to render above lockscreen (#9793)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user