From bda8208aaa3d7eb9f14d49691b919f8f2e9f5594 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 10 Feb 2023 22:03:23 +0000 Subject: [PATCH] render lockscreen in fullscreenworkspace --- src/render/Renderer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index c813b357..9efb07c8 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -212,6 +212,18 @@ void CHyprRenderer::renderWorkspaceWithFullscreenWindow(CMonitor* pMonitor, CWor // if correct monitor draw hyprerror if (pMonitor == g_pCompositor->m_vMonitors.front().get()) g_pHyprError->draw(); + + if (g_pSessionLockManager->isSessionLocked()) { + const auto PSLS = g_pSessionLockManager->getSessionLockSurfaceForMonitor(pMonitor->ID); + + if (!PSLS) { + // locked with no surface, fill with red + wlr_box boxe = {0, 0, INT16_MAX, INT16_MAX}; + g_pHyprOpenGL->renderRect(&boxe, CColor(1.0, 0.2, 0.2, 1.0)); + } else { + renderSessionLockSurface(PSLS, pMonitor, time); + } + } } void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* time, bool decorate, eRenderPassMode mode, bool ignorePosition, bool ignoreAllGeometry) {