aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2024-07-27 18:13:41 +0200
committervaxerski <[email protected]>2024-07-27 18:13:41 +0200
commit141cd09bd3315aedc075d451fd120a9504886ec1 (patch)
tree21a6706ae0042a7a3f3e98696a0b6c6f78da9d8a
parent024327154425c76a2932d644d76990a00b5fcdac (diff)
downloadHyprland-141cd09bd3315aedc075d451fd120a9504886ec1.tar.gz
Hyprland-141cd09bd3315aedc075d451fd120a9504886ec1.zip
renderer: use session lock alpha for rendering lacking locks
-rw-r--r--src/render/Renderer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index d8de7ba8..0bf4c9f3 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -824,8 +824,9 @@ void CHyprRenderer::renderAllClientsForWorkspace(CMonitor* pMonitor, PHLWORKSPAC
if (g_pSessionLockManager->isSessionLocked() && !g_pSessionLockManager->isSessionLockPresent()) {
// locked with no exclusive, draw only red
- CBox boxe = {0, 0, INT16_MAX, INT16_MAX};
- g_pHyprOpenGL->renderRect(&boxe, CColor(1.0, 0.2, 0.2, 1.0));
+ CBox boxe = {0, 0, INT16_MAX, INT16_MAX};
+ const float A = g_pSessionLockManager->getRedScreenAlphaForMonitor(pMonitor->ID);
+ g_pHyprOpenGL->renderRect(&boxe, CColor(1.0, 0.2, 0.2, A));
return;
}