From 01971cb6c7b7607329314645bf46e83d985eafeb Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Mon, 14 Jul 2025 13:13:54 +0200 Subject: session-lock: don't render workspaces when locked (#10865) Avoid rendering the workspace behind if we are locked --- src/managers/SessionLockManager.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/managers/SessionLockManager.hpp') diff --git a/src/managers/SessionLockManager.hpp b/src/managers/SessionLockManager.hpp index da15496e..2938a851 100644 --- a/src/managers/SessionLockManager.hpp +++ b/src/managers/SessionLockManager.hpp @@ -3,6 +3,7 @@ #include "../defines.hpp" #include "../helpers/time/Timer.hpp" #include "../helpers/signal/Signal.hpp" +#include "./eventLoop/EventLoopTimer.hpp" #include #include #include @@ -29,10 +30,10 @@ struct SSessionLockSurface { struct SSessionLock { WP lock; - CTimer mLockTimer; + CTimer lockTimer; + SP sendDeniedTimer; std::vector> vSessionLockSurfaces; - std::unordered_map mMonitorsWithoutMappedSurfaceTimers; struct { CHyprSignalListener newSurface; @@ -41,6 +42,7 @@ struct SSessionLock { } listeners; bool hasSentLocked = false; + bool hasSentDenied = false; std::unordered_set lockedMonitors; }; @@ -51,10 +53,9 @@ class CSessionLockManager { WP getSessionLockSurfaceForMonitor(uint64_t); - float getRedScreenAlphaForMonitor(uint64_t); - bool isSessionLocked(); - bool isSessionLockPresent(); + bool clientLocked(); + bool clientDenied(); bool isSurfaceSessionLock(SP); bool anySessionLockSurfacesPresent(); @@ -72,6 +73,7 @@ class CSessionLockManager { } m_listeners; void onNewSessionLock(SP pWlrLock); + void removeSendDeniedTimer(); }; inline UP g_pSessionLockManager; -- cgit v1.2.3